Re: [csswg-drafts] [css-nesting-1] Syntax Invites Errors (#7834)

> > Part of the implication of this proposal is that you never mix back-and-forth between nested rules and declarations:
> > ```
> > * Declarations always come first
> > 
> > * Once you start nesting, everything has to be nested (within that block/nesting-level)
> > ```
> 
> Right, that is my main hesitation about this proposal. We get some good copy-and-paste behavior at the expense of a different copy-and-paste problem, where people who regularly paste new declarations at the end of an existing block may not get what they expect.

a) Interleaving declarations and rules makes code harder to read, you now have to hunt down the entire rule with all its descendants to understand how the base element is styled, so I'm fine disallowing that.
b) For that reason, I think it's a fairly uncommon practice even in contexts that allow it, such as our `@page` or Sass' nesting. We can probably ask the Almanac folks for some stats on that if it would be useful.

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


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

Received on Wednesday, 5 October 2022 22:44:10 UTC