Style parameters include all possible parameters that can be used by any value or declaration.
Returns the pixel density of the design.
Returns the format specifier for color values, hex
, rgb
, and hsl
.
Returns true
if the line-height
property should be unitless.
Color parameters only include colorFormat
, used when only color related parameters are required.
Length parameters include densityDivisor
and remPreferences
, used when only parameters that affect length values are required.
Rem preferences include useForFontSize
useForMeasurements
and rootFontSize
, used for rem usage.
Style function represents functions, e.g. scaleX(0.7)
.
Returns the name of the function.
args
: Array<StyleValue>
Returns the arguments of the function.
Variable map is a specialized object structure whose keys are the values assigned to the variables and the values are variables' identifiers.
const variableMap = {
"#000000": "black",
"12px": "default-line-height"
};