4 ms·
For the longest time, I didn't get it either. It took me actually trying it out in a project to like it. It's true, much of it is the same as writing inline-sty
by Cu3PO42 2y ago
For the longest time, I didn't get it either. It took me actually trying it out in a project to like it. It's true, much of it is the same as writing inline-styles, but it's also more powerful than that. Here's a few things that I like about it:
- Ability to use pseudo-selectors, etc. in "inline-styles"
- Limited set of predefined values to use for padding, margin, and such that make it a bit easier to stay consistent
- Some helpful utilities like good looking shadows and animations
Sure, I could achieve all of that in a different way. Nothing about it is ground-breaking or even unique, but it's a nice package that works well for me.
- dsego 2y ago> Limited set of predefined values to us... With the ability to predefine css constants I guess it's now possible to use the style prop directly and not have to use raw hex colors and pixel values (eg. there are css libraries with these https://open-props.style https://open-props.style).