Re: [csswg-drafts] [css-scoping] Please bring back scoped styles (#3547)

> The reason why the scoped attribute idea was abandoned is that, in contrast to ShadowDOM, it didn't come with any lower boundary. This means that styles affect an entire subtree rather than a single "component".

It doesn't have to be like that. The `@scope` syntax could support an optional lower boundary. Just an idea:

```css
@scope (include: .carousel) and (exclude: .carousel-slide) {
    p {
        /* styles here wouldn't affect paragraphs inside .carousel-slide */
    }
}
```

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

Received on Thursday, 22 August 2019 20:50:27 UTC