[csswg-drafts] [css-nesting] Should prefixing nested selectors be mandatory? (#8270)

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

== [css-nesting] Should prefixing nested selectors be mandatory? ==
As mentioned in #8248, some people expressed support for making the ampersand in nested rule selectors mandatory. Some discussion already happened in the other issue, though here's a summary of its advantages and disadvantages:

Advantages:

* Clarity for authors and readers (e.g. `&::before` vs. `& ::before`)
* Allows support for full selector syntax (including type selectors)
* Lets UAs still distinguish selectors from property declarations on the first character even with type selector support

Disadvantages:

* Confusing for authors when using `&` later in the selector (in case `&` is used as prefix *and* reference for elements matched by the parent rule)
* More to write for authors
* Unnecessary regarding parsing (except for type selectors)

Sebastian

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


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

Received on Saturday, 31 December 2022 00:08:25 UTC