style-dictionary-utils
Version:
Utilities to use in your style dictionary config
9 lines (8 loc) • 490 B
TypeScript
import { Transform } from 'style-dictionary/types';
/**
* @description converts dimension tokens value to float without unit, ignores `em` as they are relative to the font size of the parent element
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
* @matcher matches all tokens of $type `dimension`
* @transformer returns a float number
*/
export declare const dimensionToPixelUnitless: Transform;