jxColorRules top-level constant

List<JxRuleContract> const jxColorRules

Colors : c: (color) et bg: (background-color). Accepte les tokens du thème, les couleurs hexadécimales et les valeurs arbitraires.

Implementation

const List<JxRuleContract> jxColorRules = [
  JxValueRule(
    'color',
    properties: {
      'c': ['color'],
    },
    themeCategory: JxThemeCategory.colors,
    fallback: _hexColorFallback,
  ),
  JxValueRule(
    'background-color',
    properties: {
      'bg': ['background-color'],
    },
    themeCategory: JxThemeCategory.colors,
    fallback: _hexColorFallback,
    propertySelector: _backgroundImageSelector,
  ),
  JxValueRule(
    'background-size',
    properties: {
      'bgs': ['background-size'],
    },
    keywords: {'auto': 'auto', 'cover': 'cover', 'contain': 'contain'},
  ),
];