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

The current spec text says about the combinator that:

> It does not change the [=:scope element=].

We defined it that way to avoid having `:scope` mean different things in different parts of the selector - but that would change how this de-sugaring happens. Given a combination of `@scope` and the combinator:

```css
@scope (.a) { 
  .b >> .c :scope { ... }
}
```

We could de-sugar directly, leaving `:scope` intact:

```css
@scope (.a) {
  @scope (.b) {
    .c :scope { ... }
  }
}
```

In that case `:scope` refers to the scoping element `.b` that is a sibling of `.a`, matching if it is also an arbitrary descendant of `.c`.

On the other hand, if we only want the at-rule to update the meaning of `:scope`, we would need to de-sugar such that `:scope` refers to the scoping element `.a` - and it's not clear to me how we would achieve that. 

(I'm somewhat drawn to the conclusion that these combinators introduce more authoring complexity than they solve, and we should at remove or defer to another level, so they don't block shipping a more clear at-rule syntax)

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


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

Received on Friday, 17 February 2023 20:15:14 UTC