Re: [csswg-drafts] [css-nesting] wording `&&` "silly", but useful (#9113)

While this way of handling specificity is very useful ATM, I'm not sure it should be promoted in any way in the specs. Two reasons:

1. Right now, I would always suggest using a `[class]` to bump the specificity of a selector (which usually has a class). This guarantees that changes to the selector won't break the `&&`, and if the preprocessors are involved, can result in a more compact CSS if there are long classNames.

2. Either method of adjusting specificity should go away with time, when we would be comfortable with using `@layer` in our styles and would rely on it more, as using layers is _the_ way to control how things should override each other.

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


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

Received on Tuesday, 25 July 2023 12:50:36 UTC