[css-nesting] Semantic of nesting selector is unclear #2895
Labels
Closed as Question Answered
Used when the issue is more of a question than a problem, and it's been answered.
css-nesting-1
Current Work
The current spec says
It is unclear whether
&
in a selector means an element matched by the parent rule, or any elements matched by the parent rule. This affects what would happen when multiple nesting selectors appear in a single complex selector.For example, should
a, b { & c & { } }
matches nothing (in the former semantic that a&
always means a single element at a time, and since an element cannot be its descendant, this selector is nonsense), or:matches(a, b) c :matches(a, b)
(in the latter semantic).This may significantly affect how nesting rules would be implemented, and I suppose the former semantic may be easier to implement efficiently.
The text was updated successfully, but these errors were encountered: