Re: [w3ctag/design-reviews] Early design review of light-DOM CSS Scope proposal (#593)

### Shadow DOM

For selectors in @scope rules in shadow trees, we should figure out which restrictions apply wrt matching elements outside the shadow tree. @scope rules in shadow trees should not be able to target elements outside the shadow tree, but what about :host/:host-context? 

- `@scope (:host(.a))` : should not match
- `@scope (:host(.a) .b)` : should match?
- `@scope (::slotted(.a))` : should not match
- `@scope (::part(my-part))` : should not match

### Pseudo Elements

IIUC, you can target the scope-root itself in `@scope` rules. Can tree-abiding pseudo elements be `@scope` roots?

Is this allowed?

```css
  @scope (div::before) {
    & { content: "xxx" }
  }
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/593#issuecomment-768992509

Received on Thursday, 28 January 2021 11:33:55 UTC