jxTransformRules top-level constant
Transformations : tx:, ty: (propriété translate) et sc: (scale).
Les propriétés individuelles translate / scale se combinent sans
s'écraser (hover:-ty:1 hover:sc:105).
Implementation
const List<JxRuleContract> jxTransformRules = [
JxValueRule(
'translate-x',
properties: {
'tx': ['--jx-tx'],
},
themeCategory: JxThemeCategory.spacing,
keywords: _insetKeywords,
disallowed: {'auto'},
allowNegative: true,
extra: {'translate': _translate},
),
JxValueRule(
'translate-y',
properties: {
'ty': ['--jx-ty'],
},
themeCategory: JxThemeCategory.spacing,
keywords: _insetKeywords,
disallowed: {'auto'},
allowNegative: true,
extra: {'translate': _translate},
),
JxValueRule(
'scale',
properties: {
'sc': ['scale'],
},
keywords: {
'0': '0',
'50': '0.5',
'75': '0.75',
'90': '0.9',
'95': '0.95',
'100': '1',
'105': '1.05',
'110': '1.1',
'125': '1.25',
'150': '1.5',
},
),
];