Re: [csswg-drafts] [css-cascade] [css-nesting] Figure out whether we're fine with "shifting up" bare declarations after rules (#8738)

> Sure they could, but we don’t design APIs based on the 1% of cases. Far better to have reasonable behavior in the 99% of cases and magic in the 1% than the other way around, even if the magic case in the former seems more magic.

Basically my opinion is that the more magic we have for this, the worse it is. There's a minimum amount of magic we need for usability's sake (automatically wrapping the declaration in this new rule when parsing), but beyond that I strongly prefer for everything to be as normal and unsurprising as possible. Every bit of magic is another sharp corner we have to be aware of and design around, forever, vs something predictable and boring.

Importantly, pay attention to the use-case you're talking about - when does an author serialize a CSS rule and manually examine the results? That seems... super rare to me. It's the sort of thing I, personally, have only ever done to debug things. Putting aside the question of whether it's better to serialize the implicit rule or not, does this case occur often enough that it's worth doing *anything* custom at all? In my opinion, definitely not.

> [talk about using CSSStyleDeclaration]

Same point, really - is it worth doing *anything* more complicated than just "here's a new type of at-rule, it acts like you'd expect"?

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8738#issuecomment-2059909232 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 16 April 2024 20:56:02 UTC