Re: [csswg-drafts] [css-nesting] Problems with indiscriminately wrapping all parent selectors with `:is()` (#9492)

@Loirooriol 
> I'm not convinced that the specificity needs to be changed.

I don’t think anybody is arguing for that — probably way too late due to web compat, and also unclear *how* it could be changed. There’s a reason `:is()` flattens specificity.

@andruud 
> > So a quick fix to the pressing issues could be to simply special case &.
> 
> Honest question: what's the pressing issue? Pseudo-elements don't currently work, but it seems fine to have a restriction that we can lift later?

#8738 is the pressing issue, not pseudo-elements. See [resolution from yesterday](https://github.com/w3c/csswg-drafts/issues/8738#issuecomment-1768977689).

> > Treating a & alone different than when used in a more complex selector seems extremely hacky and a source of confusion to me.
> 
> +1

Maybe special casing `&` is hacky, but not wrapping hierarchies of simple selectors seems like a direct improvement, akin to e.g. not using parens when parens are not needed when generating expressions. `:is()` are basically the parens of CSS selectors.

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


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

Received on Thursday, 19 October 2023 14:31:05 UTC