CSS
To convert a token to CSS, you can import all the functions under the CSS namespace: @specifyapp/sdk/css
import { dimensionToCss, colorToCss, ... } from '@specifyapp/sdk/css';Primitives tokens
Here is the list of the primitives tokens for the CSS parser with an example of their respective output type.
Border
Input:
{
color: { model: 'hex', hex: '#ffffff', alpha: 0.5 },
style: 'dashed',
width: {
value: 12,
unit: 'px',
},
rectangleCornerRadii: null,
}Output:
'12px dashed #ffffff80'Breakpoint
Input:
Output:
Color
RGB
Input:
Output:
HEX
Input:
Output:
HSB
Input:
Output:
HSL
Input:
Output:
LAB
Input:
Output:
LCH
Input:
Output:
Cubic bezier
Input:
Output:
Dimension
Input:
Output:
Duration
Input:
Output:
Font weight
Input:
Output:
Gradient
Conic
Input:
Output:
Linear
Input:
Output:
Radial
Input:
Output:
Gradients
Input:
Output:
Opacity
Input:
Output:
Radii
Input:
Output:
Radius
Input:
Output:
Shadow
Input:
Output:
Shadows
Input:
Output:
Spacing
Input:
Output:
Spacings
Input:
Output:
Steps timing function
Input:
Output:
Z-index
Input:
Output:
Composites tokens
Here is the list of the composites tokens for the CSS parser with an example of their respective output type.
Font
Input:
Output:
Text style
Input:
Output:
Transition
Input:
Output:
Last updated
Was this helpful?