CSSStyleSheet constructor and shadowRoot.adoptedStyleSheets

61 views
Skip to first unread message

Jan Scheurer

unread,
Mar 16, 2022, 4:28:47 PMMar 16
to
In firefox 96 on linux both of these features are implemented and functional(maybe I set a flag somewhere ages ago?), however in firefox 98 on MacOS neither work, caniuse shows them as not supported, the bugzilla issue tracking adoptedStyleSheets was closed as resolved two years ago.

What's the official stance on these features? I'd really like to use them to not have style tags in shadow dom, especially for custom elements that may be instantiated in the hundreds if not thousands.

Regards

Sebastian Zartner

unread,
Mar 17, 2022, 2:50:32 AMMar 17
to
I'm not a Mozilla employee, though I can say that the feature is still behind a flag called layout.css.constructable-stylesheets.enabled. The related bugs are https://bugzil.la/1520690 for its implementation which is obviously not complete yet and https://bugzil.la/1644102 for enabling it by default.

Sebastian

Jan Scheurer

unread,
Mar 17, 2022, 5:57:28 AMMar 17
to
Thank you Sebastian, that was the flag I activated!
Good to see that there's still some progress being made on getting those features to mainline.

Best regards
Reply all
Reply to author
Forward
0 new messages