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

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-nesting-1] Syntax Invites Errors ==
As mentioned in #7796, there are some problems with the currently-proposed nesting syntax:

* selectors within nested context are incompatible with those outside of nested context, and with syntax within `@scope`, which invites a lot of copy-paste errors when transferring code among these contexts
* the requirement to include `&` within all the selectors in a list even beyond syntactic disambiguation (instead of allowing relative selectors) is annoying to type, easy to forget, and makes automated (and manual) conversion of existing code much more difficult (requires selector parsing rather than regex).
* `&.foo` and `& .foo` are easily confusable (both for reading and for typing), and so long as the latter is required for nested relative selectors this will be a commonly encountered problem

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7834 using your GitHub account


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

Received on Wednesday, 5 October 2022 19:42:12 UTC