News for hackers. Stuff that matters.
Re:Help pick a syntax for CSS nesting by tambourine_man on Wednesday July 27, 2022 @02:12PM (#32254244)
AFAIK, this is just syntactic sugar. A shortcut.

It’s not scoping in the inheritance sense. The C in CSS is for cascading. Inheriting is the natural way to be for CSS

Re:Help pick a syntax for CSS nesting by dmitriid on Wednesday July 27, 2022 @05:15PM (#32257084)
Casacading !== inheritance. These are very different things. I wish we had inheritance (or traits) in CSS.
Re:Help pick a syntax for CSS nesting by tambourine_man on Thursday July 28, 2022 @08:18AM (#32263301)
Well tell me the difference then. We have cascading inheritance, that’s what CSS is all about.

Unless we’re using different definitions of the term

Re:Help pick a syntax for CSS nesting by dmitriid on Thursday July 28, 2022 @09:04AM (#32263727)
Casacading alpplies to all elements in the cascade. Whether you want it or not.

At the same time it's impossible to say "hey, I want to inherit from that particular style", and not have the cascade apply to it. For example, I want a button and I don't want anything in the hierarchy above overriding its borders, or colors, or fonts, or...

Re:Help pick a syntax for CSS nesting by tambourine_man on Thursday July 28, 2022 @11:06AM (#32265353)
Oh, I see. Arbitrary non hierarchical opt-in inheritance. Or perhaps a cascading inheritance opt-out, and you could add classes back as you please. That would be cool.

Not sure how it would impact browser parsing and drawing, but it sure would be useful.