-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Description
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.
&::beforevs.& ::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