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

> I would prefer to serialize the `@nest` always, because authors can write things like:
> 
> ```css
> .foo {
>   color: blue;
>   @nest {
>     color: red;
>   }
> }
> ```
> 
> And I'd prefer not to make the choice of whether to serialize or not dependent on whether a _non-`@nest`_ rule has been seen yet.

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 former seems more magic.

Also @mdubet makes a good point: is there value in authors actually writing `@nest`? What if they can't, and it basically becomes a CSSOM implementation detail?

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8738#issuecomment-2059862762 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:22:24 UTC