Just use statically analyzable static CSS-in-JS objects, then yes, this could remove a runtime entirely.
So a couple of things here: if you leave your CSS in a <style> tag and don't have it as a JS string, you skip double-parsing
-
-
Next, `insertRule()` will do the exact same work as the CSS parser, so that's 1:1 for styles you'll use. Question will be "when?"
-
...but you'll have to reify wrapper objects for all of these rules (more memory) if you do it in JS.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.
Would love to see more folks move to what can be statically analyzed to drop double parse costs of runtime CSS-in-JS.