Open roman01la opened 6 years ago
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 660693db4.
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.