Would love to see more folks move to what can be statically analyzed to drop double parse costs of runtime CSS-in-JS.
-
-
Did you see
@threepointone's latest mad scientist creation? https://github.com/threepointone/glam/blob/master/README.md … "Make Alex Happy"2 replies 0 retweets 12 likes -
Replying to @kylemathews @kentcdodds and
Haha.
@slightlylate your happiness is now a product feature. For reals, more precompilation/CSS output from CSS-In-JS solns always welcome.1 reply 0 retweets 9 likes -
Replying to @addyosmani @kylemathews and
fwiw glamor uses insertRule, which iiuc avoids DOM parsing?
1 reply 0 retweets 0 likes -
Replying to @threepointone @addyosmani and
Unless I misunderstand, `insertRule()` takes a string which is then parsed. The CSS Typed OM is still a WIP: https://drafts.css-houdini.org/css-typed-om-1/
1 reply 0 retweets 0 likes -
Replying to @slightlylate @addyosmani and
Right, is that very different from the perf of <style>? insertRule() avoids adding text node to the dom (as opp to appending text to style)
2 replies 0 retweets 0 likes -
Replying to @threepointone @slightlylate and
With fiber/rIC, it interleaves these changes with dom updates, which is nice
1 reply 0 retweets 0 likes -
Replying to @threepointone @addyosmani and
Not sure what you're buying. The CSS is still a JS string that is getting passed from the JS to DOM. Better off disabling a stylesheet?
1 reply 0 retweets 0 likes -
Replying to @slightlylate @threepointone and
And I don't know what Fiber does for you here (aside from fewer janky frames overall). Total work the same.
1 reply 0 retweets 0 likes -
Replying to @slightlylate @threepointone and
Is "double parse" what happens when CSS strings are embedded in JS like Webpack does?
2 replies 0 retweets 0 likes
-
-
Replying to @slightlylate @sebmarkbage and
Both parses are "cheap", but doubling up your memory footprint, going through string interning gunk, delaying parsing...it all adds up
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.