r/css • u/techie_e • 5d ago
Article GitHub Ditches CSS-in-JS for CSS Modules, Reports 55% Faster SSR after Three-Year Migration
https://www.infoq.com/news/2026/11/github-css-migration/
155
Upvotes
70
u/jonassalen 4d ago •
Is that a surprise? CSS-in-JS was a bad idea to begin with.
21
u/_HMCB_ 4d ago
Why is everything so complex nowadays. 😣
10
u/gajus0 3d ago
CSS-in-JS is not the issue here.
https://github.com/bamboocss/bamboo
Bamboo is an example of CSS-in-JS that compiles to pure CSS at build time while still allowing to colocate styles with components, write dynamic style expressions, etc.
Ironically, I am also the author of (once popular)
react-css-modules, which is the approach that GitHub team took.10
u/kekeagain 4d ago
I think as CSS continues moving forward in scoping, relational styling, programmatic constructs, and with AI making the "tedious" bits like naming moot, I think people will being asking if the Tailwind and CSS-in-JS abstraction layer is relevant today.
13
u/yihuaxiang 4d ago
The 55% SSR number is the part I'd pay attention to. A lot of the CSS-in-JS cost wasn't the syntax, it was generating or injecting styles at request time on the server. CSS Modules (or plain CSS files) can be built once and served as static assets, so the HTML doesn't have to wait on a runtime to emit styles. That's a much bigger deal on a large app than whether you like writing className or not.
2
u/dusanodalovic 4d ago
three years is what stands out to me. while both were live on the same pages, how did they keep the old runtime styles and the new css files from fighting over order and specificity? did they go page by page or component by component
5
u/New-Peach4153 4d ago
I'd like to say GitHub is typically a buggy/bad UX whenever I bother using the website
1
u/Lurker-8580 4d ago
Reinventing the wheel over and over again
1
u/HongPong 3d ago
across all of GitHub how much css is there even? seems over engineered
1
u/putotoystory 2d ago
CSS-in-JS is a terrible idea, just like how tailwind pollutes the class attribute. I just developed .cssx instead and it works best with tsx.
-1
u/FigureNo77 3d ago
just use static css files