You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this can be useful for someone who's building design system for their project. I've pushed transformers for spacing, font size and width utilities in 660693d.
The idea
The idea is to hide details about spacing, font size, etc. behind special attributes.
For example this
{:width0.1:font-size2:mx4}
Transforms into this (based on user-defined scale, such as :font-size [4 8 16 32 64])
It would be extremely handy to specify at least a basic unit like classic html { font-size: 8px } used for rem-based grid. I'm not sure about doing it with multiple contexts but for simple cases just swapping some imported atom (reset! cljss/default-unit "8px") wolud be nice.
See styled-system for reference.
I think this can be useful for someone who's building design system for their project. I've pushed transformers for spacing, font size and width utilities in 660693d.
The idea
The idea is to hide details about spacing, font size, etc. behind special attributes.
For example this
Transforms into this (based on user-defined scale, such as
:font-size [4 8 16 32 64]
)Possible API
Those utilities should be reusable and used to extend
defstyled
components. Rum-style mixins might be a good solution (I'm biased since I'm Rum user).What do you think? Any ideas? I'd really appreciate your feedback.
The text was updated successfully, but these errors were encountered: