W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2019

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

From: Benoît Rouleau via GitHub <sysbot+gh@w3.org>
Date: Thu, 22 Aug 2019 20:50:26 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-524072096-1566507025-sysbot+gh@w3.org>
> 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:

@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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:52 UTC