Re: [csswg-drafts] [css-nesting] Conflicts in proposal with Sass/Less (#2937)

Just a comment to add to this issue, in case someone comes across this. Related to:

> Stepping away from the argument-from-authority, tho, that syntax is also intrinsically ambiguous. There's no way to tell, given a selector like &foo, whether that's meant to be adding a foo type selector to the parent selector, or if it's meant to be appending the characters "foo" to the identifier of the last simple selector in the parent selector.

Having spent the last year re-writing a Less parser that extends a valid CSS parser (and having to deeply study more of the CSS spec to do so) I now agree with this statement by @tabatkins and more of the points made here about grammatical ambiguity.

Both Less & Sass parsing have unfortunate amounts of ambiguity (and exacerbates some unfortunate CSS grammatical ambiguity) due to nesting syntax, not just what `&foo` should mean, but determining, for example, if the start of a rule is, for example, a qualified rule or a declaration.

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


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

Received on Wednesday, 2 September 2020 17:07:39 UTC