-
Notifications
You must be signed in to change notification settings - Fork 23
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
Constructable Stylesheet Objects (including adoptedStyleSheets) #42
Comments
This feature seems to have some loose ends. What happened to this issue for example? |
We also raised a number of concerns in WICG/construct-stylesheets#45 but I don't think all of them are adequately addressed. |
What solution do you expect to change in the current spec for Safari to agree to implement it? Without a native implementation in Safari, polyfill code will be executed, which gives worse performance. |
As of WebKit/WebKit@5de6ac4 this is implemented and enabled by default. Per WICG/construct-stylesheets#140 however it seems like the specification has moved and the resolution of the open issues is unclear? It's now part of https://drafts.csswg.org/cssom/ and there's at least some trivial-but-significant issues with the feature defined in that specification such as w3c/csswg-drafts#7799. As such adding |
In version 156 of Safari Tech Preview, this is implemented. |
CSS module scripts would be a separate topic and therefore issue, yes. |
This feature has been implemented and shipped in WebKit as of Safari 16.4 |
Request for position on an emerging web specification
(Please delete inapplicable rows.)
Information about the spec
Design reviews and vendor positions
Bugs tracking this feature
N / A
Anything else we need to know
Constructable Stylesheets and
adoptedStyleSheets
enable adding styles directly to shadow roots without creating new DOM elements. Because a single stylesheet object can be adopted by multiple scopes, it also allows sharing of styles that can be centrally modified.Motivation
<style>
elements for each style used in each shadow root has a measurable performance overhead.The text was updated successfully, but these errors were encountered: