diff --git a/build.js b/build.js index ea42a33..2494e47 100755 --- a/build.js +++ b/build.js @@ -145,6 +145,7 @@ StyleDictionary.registerTransform({ }, transformer: (token, options) => { const baseFont = getBasePxFontSize(options); + if (token.value.toString().endsWith('%')) { return token.value }; const floatVal = parseFloat(token.value); if (isNaN(floatVal)) { diff --git a/config.js b/config.js index 9937862..0032d20 100644 --- a/config.js +++ b/config.js @@ -14,7 +14,7 @@ const getStyleDictionaryConfig = (theme) => { ], }, css: { - transforms: ['dt/size/pxToRem', 'dt/space/pxToRem', 'dt/fonts/transformToStack', 'dt/lineHeight/percentToDecimal', 'attribute/cti', 'name/cti/kebab', 'time/seconds', 'content/icon', 'size/rem', 'color/css'], + transforms: ['dt/size/pxToRem', 'dt/space/pxToRem', 'dt/fonts/transformToStack', 'dt/lineHeight/percentToDecimal', 'attribute/cti', 'name/cti/kebab', 'time/seconds', 'content/icon', 'color/css'], actions: ['buildDocJson'], prefix: 'dt', buildPath: 'dist/css/',