GitHub's Primer Design System migrates from CSS-in-JS to CSS Modules
GitHub's Primer Design System team replaced its CSS-in-JS styling approach with CSS Modules after performance problems emerged as component counts grew on pages. The switch removes client and server runtime style processing, instead bundling styles into stylesheets delivered with page HTML, and required updates across every Primer component and consuming component at GitHub.
GoKawiil's interpretation of the reporting above, not reported fact.
The change suggests that CSS-in-JS approaches can become a performance bottleneck at large scale, particularly for server-side rendering, prompting teams to revisit older native CSS techniques. Because design systems are widely reused, the Primer team's migration path could serve as a reference for other large organizations facing similar scaling issues.
- CSS-in-JS caused slower initial page loads and degraded server-side rendering as component counts grew
- GitHub's Primer team adopted CSS Modules to eliminate client/server runtime style processing
- The migration required updating every Primer component and every GitHub component using the old technique
Source: github.blog — Josh Black, 2026-09-26
Published there as: “Improving site performance by shipping more CSS”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.