Re: [csswg-drafts] [css-nesting-1] & representing parent elements vs parent selector (#8310)

There's a restriction in Sass, not in the current nesting spec, that the & has to be the leftmost part of a compound. That could make it a bit easier to implement it with a synthesized special :is()-like that keeps track of the element matching the leftmost compound inside the :is()-like and continue adjacent/descendant matching to the left using that element as the candidate, but that wouldn't easily make specificity match. We would have to compute the specificity dynamically by matching all sub-selectors to find the one with the highest specificity (assuming the specifity behavior also has to match current Sass).


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


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

Received on Wednesday, 18 January 2023 14:02:40 UTC