GitHub removed runtime styling work by shipping CSS files
GitHub’s Primer team moved components from runtime CSS-in-JS to CSS Modules, producing stylesheets ahead of time instead of collecting and initializing styles while rendering. The migration used component-level feature flags and visual regression checks to preserve existing behaviour. Its report illustrates why sending more CSS can still improve performance when it removes repeated work on both server and client.
GitHub · Sep 25, 2026
Why it matters
Performance depends on when work happens, not just the number of bytes in one asset.
More context
Read the component migration section and try measuring a representative page before changing styling systems. The report describes work begun in 2023, with Primer’s component migration completed in December 2024.
Keep in mind
This is a newly published account of an older migration. GitHub’s reported gains depend on its component workloads and do not prove every CSS-in-JS application needs rewriting.
Original read