Theemo / @theemo/style-dictionary / isNoCSSProperty
Function: isNoCSSProperty()
ts
function isNoCSSProperty(token): boolean;
Defined in: filters/css-property.ts:90
Checks whether a token can NOT be formatted into a CSS @property
. Use it in combination with the css/properties
formatter.
Parameters
Parameter | Type | Description |
---|---|---|
token | TransformedToken | the token in question |
Returns
boolean
true
when the token can NOT be formatted as @property
, otherwise false
Example
Usage:
js
import StyleDictionary from 'style-dictionary';
import { isNoCSSProperty, cssPropertiesFormater } from '@theemo/style-dictionary';
StyleDictionary.registerFormat(cssPropertiesFormater);
export default {
source: ['tokens/**/*.json'],
platforms: {
css: {
files: [
{
format: 'css/variables',
destination: 'vars.css',
filter: isNoCSSProperty
}
]
}
}
};