@primer/primitives
Version:
Typography, spacing, and color primitives for Primer design system
10 lines (9 loc) • 583 B
TypeScript
import type { Transform } from 'style-dictionary/types';
/**
* @description converts dimension tokens value to pixel value without unit
* @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 number for px/rem values, or a string with unit for em values (cannot convert to unitless)
* @note Expects W3C DTCG format { value: number, unit: "px" | "rem" | "em" }
*/
export declare const dimensionToPixelUnitless: Transform;