You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In describing scope proximity in terms of cascade precedence, the spec mentions:
When comparing declarations that appear in style rules with different scoping roots, then the declaration with the fewest generational or sibling-element hops between the scoping root and the scoped style rulesubject wins.
Elements being in scope is a purely ancestor-descendant affair, so the mention of sibling hops doesn't make sense to me. Sibling of a scope root would, by definition, be not in scope. One possible interpretation would be to count sibling and ancestor hops for the matched selector, but I'm not sure how useful/intuitive that is. Also, I don't think any supported browser does that, given the below example always uses green:
In short - Should the reference to "sibling hops" be removed?
It was probably worded like that in anticipation of sibling scopes, which hasn't made it into the spec yet. In other words, proximity is one cascade criterion, that is either derived from the ancestor-descendant proximity (@scope), or from the sibling proximity (@scope-siblings).
In describing scope proximity in terms of cascade precedence, the spec mentions:
Elements being in scope is a purely ancestor-descendant affair, so the mention of sibling hops doesn't make sense to me. Sibling of a scope root would, by definition, be not in scope. One possible interpretation would be to count sibling and ancestor hops for the matched selector, but I'm not sure how useful/intuitive that is. Also, I don't think any supported browser does that, given the below example always uses green:
In short - Should the reference to "sibling hops" be removed?
The text was updated successfully, but these errors were encountered: