jxTypographyRules top-level constant
Typography : fs:, fw:, lh:, ta:.
Implementation
const List<JxRuleContract> jxTypographyRules = [
JxValueRule(
'font-size',
properties: {
'fs': ['font-size'],
},
themeCategory: JxThemeCategory.fontSize,
),
JxValueRule(
'font-weight',
properties: {
'fw': ['font-weight'],
},
themeCategory: JxThemeCategory.fontWeight,
fallback: _fontWeightFallback,
),
JxValueRule(
'line-height',
properties: {
'lh': ['line-height'],
},
themeCategory: JxThemeCategory.lineHeight,
fallback: _unitlessNumberFallback,
),
JxValueRule(
'text-align',
properties: {
'ta': ['text-align'],
},
keywords: {
'left': 'left',
'center': 'center',
'right': 'right',
'justify': 'justify',
'start': 'start',
'end': 'end',
},
allowArbitrary: false,
),
JxValueRule(
'vertical-align',
properties: {
'va': ['vertical-align'],
},
keywords: {
'baseline': 'baseline',
'top': 'top',
'middle': 'middle',
'bottom': 'bottom',
'text-top': 'text-top',
'text-bottom': 'text-bottom',
'sub': 'sub',
'super': 'super',
},
),
JxValueRule(
'list-style-type',
properties: {
'lst': ['list-style-type'],
},
keywords: {
'none': 'none',
'disc': 'disc',
'circle': 'circle',
'square': 'square',
'decimal': 'decimal',
},
),
JxValueRule(
'list-style-position',
properties: {
'lsp': ['list-style-position'],
},
keywords: {'inside': 'inside', 'outside': 'outside'},
allowArbitrary: false,
),
JxValueRule(
'font-family',
properties: {
'ff': ['font-family'],
},
themeCategory: JxThemeCategory.fontFamily,
),
JxValueRule(
'letter-spacing',
properties: {
'ls': ['letter-spacing'],
},
keywords: {
'tighter': '-0.05em',
'tight': '-0.025em',
'normal': '0em',
'wide': '0.025em',
'wider': '0.05em',
},
allowNegative: true,
),
JxValueRule(
'text-decoration-line',
properties: {
'td': ['text-decoration-line'],
},
keywords: {
'underline': 'underline',
'line-through': 'line-through',
'none': 'none',
},
allowArbitrary: false,
),
JxValueRule(
'text-decoration-color',
properties: {
'tdc': ['text-decoration-color'],
},
themeCategory: JxThemeCategory.colors,
fallback: _hexColorFallback,
),
JxValueRule(
'text-decoration-thickness',
properties: {
'tdt': ['text-decoration-thickness'],
},
keywords: {'1': '1px', '2': '2px', '4': '4px', 'auto': 'auto'},
),
JxValueRule(
'text-underline-offset',
properties: {
'tuo': ['text-underline-offset'],
},
keywords: {'1': '1px', '2': '2px', '4': '4px', '8': '8px', 'auto': 'auto'},
),
JxValueRule(
'white-space',
properties: {
'ws': ['white-space'],
},
keywords: {
'normal': 'normal',
'nowrap': 'nowrap',
'pre': 'pre',
'pre-wrap': 'pre-wrap',
'pre-line': 'pre-line',
},
allowArbitrary: false,
),
JxValueRule(
'font-stretch',
properties: {
'fst': ['font-stretch'],
},
keywords: {
'condensed': '75%',
'semi-condensed': '87.5%',
'normal': '100%',
'semi-expanded': '112.5%',
'expanded': '125%',
},
),
// Contour (focus clavier visible, encadrés) : `ol:2` => `outline: 2px solid`.
JxValueRule(
'outline',
properties: {
'ol': ['outline'],
},
keywords: {
'none': 'none',
'1': '1px solid',
'2': '2px solid',
'4': '4px solid',
},
),
JxValueRule(
'outline-color',
properties: {
'olc': ['outline-color'],
},
themeCategory: JxThemeCategory.colors,
fallback: _hexColorFallback,
),
JxValueRule(
'outline-offset',
properties: {
'olo': ['outline-offset'],
},
keywords: {'0': '0px', '1': '1px', '2': '2px', '4': '4px', '8': '8px'},
allowNegative: true,
),
];