-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
Description
Currently adoptedStyleSheets has a restriction on CSSStyleSheets that have the constructed flag set:
The set an indexed value algorithm for adoptedStyleSheets, given value and index, is the following:
- If value’s constructed flag is not set, or its constructor document is not equal to this DocumentOrShadowRoot's node document, throw a "NotAllowedError" DOMException.
I'm here to rattle this Chesterton's fence. It would be really useful to be able to pluck a documents stylesheets and adopt it into a shadowroots adoptedStyleSheets, co-opting the pages styles while applying the shadow's own styles. Currently this is possible with a rather unfortunate amount of JS by duplicating a <link> tag and stuffing it in your shadow-dom, but it feels like we can make this easier?
(Cue discussion about @import and media queries...)
Westbrook, zeroedin, iammoonman, jrjurman-jellyfish, thescientist13 and 6 morethescientist13
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Thursday morning