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

> We're already normalizing selectors; in particular, for whitespace. Also, of course we (implementors) need to do magical insertion of stuff;

We don't "normalize" serialization for other relative selectors, like in :has(); this should be the same.

> I guess maybe we're coming from different sides here;

If you're familiar with Sass or many other "nested CSS" preprocessors, the syntax as the spec now describes is pretty much exactly what they do. (Just with the "no starting with an ident" restriction.) If you're *not* familiar with those tools, yeah, it might not be the most obvious at first, but it seems to be a *very* popular and understandable syntax since it's been around for so many years and copied in so many tools.

> I think losing the “interpret & as :is(…parent list…)” is a bit sad (the new text just says “any relative selectors are relative to the elements represented by the nesting selector”, which sort of makes the :is() equivalence a secret and its specificity less than obvious?).

The section that defines the nesting selector still talks about the `:is()` equivalence, rather explicitly.

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


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

Received on Thursday, 27 October 2022 21:36:26 UTC