News for hackers. Stuff that matters.
Re:Knowing CSS is mastery to Front end Development by Cu3PO42 on Sunday March 02, 2025 @08:33AM (#43230340)
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.

Re:Knowing CSS is mastery to Front end Development by dsego on Sunday March 02, 2025 @10:56AM (#43231684)
> 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).