We would like to propose contructable stylesheet objects, which enables you to construct a
CSSStyleSheet object from a constructor.
The motivation behind this is for web pages that contains lots of web components, potentially all the same component, each component has to have a stylesheet (via
<link rel=stylesheet>), which is quite redundant and prevents rendering engines from optimizing memory and speed of component construction.
This gives an opportunity to pass a constructed
CSSStyleSheet to shadow root, without overhead of parsing the same stylesheet again.
For more details, please take a look at the explainer.
This seems pretty neat. Has this been shared with folks at Moz yet?
Chromium bug is here: https://bugs.chromium.org/p/chromium/issues/detail?id=807560
and an intent to implement is sent to blink-dev list:
We got detailed feedback from Boris on the blink-dev list, so at least Boris and you at Moz already know this Could you help for sharing more?
As Boris already pointed out there, the spec needs more polish.
We would like to make it available with an experimental implementation to get some numbers and get initial feedback from everyone.
Feel free to file an issue at
or leave a comment here.
Ok, cool. As long as Boris has seen it, then that’s great. When you are generally happy with the spec (and polished it up a bit as Boris suggested), I can ask for a review and “position” from Mozilla folks at http://github.com/mozilla/standards-positions/.
Let me know by pinging me here or on github!