👩🎨 Access your design tokens with ease
This release adds two new, but related feature:
A function that can convert em
/rem
values into px
e.g.
toPx('1.875rem', 16) // 30px
Allow the ds.fontSize()
method to return px
values regardless of options.fontSizeUnit
by adding a new parameter
e.g.
ds1.fontSize('base', true) // 20px
ds.spacing()
function: ds.space()
Renamed a few of the methods to be shorter and faster to type.
getValue()
-> get()
getColor()
-> color()
getFontSize()
-> fontSize()
getSpacing()
-> spacing()
getBreakpoint()
-> bp()
getZIndex()
-> z()
getSpacing()
-> spacing()
Updated examples to work with new methods
The ESM module path was wrong, this has now been fixed.. 🤦♂️