-
Notifications
You must be signed in to change notification settings - Fork 28
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
@scope #842
Labels
focus-area-proposal
Focus Area Proposal
Comments
Oh, looks like @miragecraft already opened an issue for this. Closing as duplicate of #838. |
(Duplicate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Allows authors to scope style rules to a given scoping root, and style elements according to the proximity of that scoping root.
Specification
https://drafts.csswg.org/css-cascade-6/#scoped-styles
Additional Signals
Standards Position
Firefox: Positive - mozilla/standards-positions#472
Safari: Positive - WebKit/standards-positions#13
Browser Bugs
Chromium (17 stars)
Mozilla
Tests
https://wpt.fyi/results/css/css-cascade?label=experimental&label=master&aligned&view=subtest&q=scope
Developer Surveys
It made the list of missing features in the State of CSS survey in 2019, 2020, and 2021. Featured in “missing features” list from state of CSS 2023
Workarounds
Scope being missing from CSS is one reason why developers lean on css-in-js libraries. These libraries can have poor performance characteristics when they parse styles as JS first, and then again as CSS.
Additional Signals
Use counter data - https://chromestatus.com/metrics/feature/timeline/popularity/4212
The text was updated successfully, but these errors were encountered: