Skip to content

[css-cascade] Remove scoped styles #637

Closed

Description

@xfq

The <style scoped> was removed from HTML (whatwg/html#552 & w3c/html#231). Should 'Scope' be removed from the cascade?

Activity

  1. keithjgrant commented on Oct 25, 2016

    @keithjgrant
    Contributor

    Related: There is a related editor’s draft for Scoping Module level 1, though I’m not sure what the direction of that spec will be going forward, or it’s relationship to scoping in the Cascade.

  2. keithjgrant commented on Oct 25, 2016

    @keithjgrant
    Contributor

    FWIW, even if “scoped styles” aren’t going to be a thing (outside of the Shadow DOM), I like the way it’s explained in the Cascade spec now. Inline styles fit more neatly as a part of Scope, rather than an odd exception to the rules of Specificity.

  3. xfq commented on Oct 27, 2016

    @xfq
    MemberAuthor

    FWIW, even if “scoped styles” aren’t going to be a thing (outside of the Shadow DOM), I like the way it’s explained in the Cascade spec now. Inline styles fit more neatly as a part of Scope, rather than an odd exception to the rules of Specificity.

    Agreed.

  4. xfq commented on Feb 12, 2017

    @xfq
    MemberAuthor

    Related: Selectors L4 also mentions the scoped <style> element in HTML.

  5. fantasai commented on Mar 30, 2017

    @fantasai
    Collaborator

    Scoping has multiple effects, which can theoretically be triggered independently:

    • scoping of selectors is in Selectors
    • scope-precedence in the cascade is in Cascade

    Since scoped styles have been mostly abandoned, the CSSWG resolved to drop scoping from Cascade L3. It's still in L4, however, in case anyone needs to refer to it. :)

  6. fantasai commented on Aug 3, 2018

    @fantasai
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions