For me, the difficult part has always been the actual cascade and working within that model of inheritance that's hidden in CSS but visible only in HTML. eg. the reason why a button color is green isn't because .button is green but because an element several levels up in HTML sets a color property.
And trying to compose styles within that paradigm. Meaning, trying to share styles, when to share styles, when to override, and how to compose distinct elements within each other.
I use Angular's components styles, too! It's actually pretty powerful when coupled with a basic top-level framework for grids and when using SCSS so you can use shared utilities and settings! :)
For me, the difficult part has always been the actual cascade and working within that model of inheritance that's hidden in CSS but visible only in HTML. eg. the reason why a button color is green isn't because
.buttonis green but because an element several levels up in HTML sets acolorproperty.And trying to compose styles within that paradigm. Meaning, trying to share styles, when to share styles, when to override, and how to compose distinct elements within each other.
For sure. I am admittedly being spoiled by Angular's View Encapsulation. I hope that's the future of CSS.
I use Angular's components
styles, too! It's actually pretty powerful when coupled with a basic top-level framework for grids and when using SCSS so you can use shared utilities and settings! :)I do think that
SCSSor similar should become the standard. There's no reason it shouldn't at this point.With the way
SCSSand other postprocessor syntax is structured, you can visualize the hierarchy better.I also think people need to be taught about the magical
unsetvalue for any property.