Re: [csswg-drafts] [cascade-6] Unclear proximity for scoped descendant combinator (#8380)

That's how I would parse the example as well. Nested scope-start rules are (according to spec already) scoped by any parent scope rules. So `#b2` is never matched by any scope rule in that example. 

> For example, the @scope chain would match B -> A -> C -> D, but the selector would not.

Right. Yeah, that's a more difficult logic to impose on a combinator.

> The question is if it's "too simple" from the author's perspective, i.e. would proximity still be useful enough in more complicated (nested) scoping scenarios? (I can't answer this question).

In my mind proximity is a useful heuristic in the simple cases - and this logic continues to handle those cases well. Once things get more complicated, authors will likely need to think about other cascade controls: layers, specificity, etc. With a heuristic like this, I think it would be a mistake to get _too clever_ about solving more complex scenarios in an abstract or magical way.

-- 
GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8380#issuecomment-1414067778 using your GitHub account


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

Received on Thursday, 2 February 2023 17:00:09 UTC