Open bengie opened 3 days ago
My setup is Styledictionary 4.0.0 with sd-transdorms 1.1.0 and now I get the rem unit appended to all 0 based values in CSS
rem
0
// before ---some-border-width: 0; // now --some-border-width: 0rem;
Expected result: no units appended to zero-based values.
The size/rem transform doesn't account for zero-based values, see https://github.com/amzn/style-dictionary/blob/main/lib/common/transforms.js#L824
An example from sd-transforms that does account for zero-based values, see: https://github.com/tokens-studio/sd-transforms/blob/main/src/transformDimension.ts#L3
Yep would be good to follow the example from sd-transforms here and ignore 0 values, since 0 doesn't need a unit. PRs welcome!
My setup is Styledictionary 4.0.0 with sd-transdorms 1.1.0 and now I get the
rem
unit appended to all0
based values in CSSExpected result: no units appended to zero-based values.
The size/rem transform doesn't account for zero-based values, see https://github.com/amzn/style-dictionary/blob/main/lib/common/transforms.js#L824
An example from sd-transforms that does account for zero-based values, see: https://github.com/tokens-studio/sd-transforms/blob/main/src/transformDimension.ts#L3