Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-cascade] Remove scoped styles #637

Closed
xfq opened this issue Oct 23, 2016 · 6 comments
Closed

[css-cascade] Remove scoped styles #637

xfq opened this issue Oct 23, 2016 · 6 comments

Comments

@xfq
Copy link
Member

xfq commented Oct 23, 2016

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

@keithjgrant
Copy link
Contributor

keithjgrant commented Oct 25, 2016

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.

@keithjgrant
Copy link
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.

@xfq
Copy link
Member Author

xfq commented Oct 27, 2016

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.

@xfq
Copy link
Member Author

xfq commented Feb 12, 2017

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

@fantasai
Copy link
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. :)

@fantasai
Copy link
Collaborator

fantasai commented Aug 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants