Re: [csswg-drafts] [css-cascade] Can we use `@scope` for style isolation? (#11002)

Even with `revert-scope` and `:scope-end`, I'm not sure we would get something that matches what you're asking for though:

```html
<style>
:root { color: green; }
.scope-root { color: teal; }
.in-scope { color: blue; }

@​scope isolated (.scope-root) to (.foo) {
  .in-scope { color: hotPink; }
  :scope-end { color: revert-scope; }
}

</style>
<div class="scope-root">
  This text is teal
  <div class="in-scope">
    <div class="foo">What color is this??</div>
  <div>
</div>
```

Since the color was never defined on `.foo`, we revert to no specified value, and still need a default from somewhere.

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


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

Received on Wednesday, 9 October 2024 22:50:30 UTC