Post

It’s a real shame that folk a decade ago weren’t warning developers against utterly insane things like CSS-in-J —  oh.

GitHub@github.com

GitHub.com has fully moved off CSS-in-JS to CSS Modules, resulting in 55% less server-side render time and 25% faster component init. https://github.blog/engineering/architecture-optimization/improving-site-performance-by-shipping-more-css/

I don't think they even have fixed the CSS-in-JS though. They aren't using native `with {type:css}` imports. This is just an extra compile tool so that developers can work with CSS, and use CSS variables instead of manipulating it, but the output is still JS.

I’m not a fan of CSS Modules anymore either, but the crucial difference is that there’s no more runtime. The object only contains a map of class names.

0 reposts0 likes

No replies yet.