Home / Companies / GitHub / Blog / Post Details
Content Deep Dive

Improving site performance by shipping more CSS

Blog post from GitHub

Post Details
Company
Date Published
Author
Josh Black, Marie Lucca
Word Count
1,659
Company Posts That Month
18
Language
English
Hacker News Points
-
Post removed?
No
Summary

GitHub’s Primer Design System migrated from a CSS-in-JS approach based on styled-components to CSS Modules after growing component counts created client initialization, server-side rendering, and style-update performance problems. The team used an incremental, feature-flagged process that paired CSS Module translations with visual regression testing and staged production rollouts, completing Primer’s component migration by December 2024 and reducing server-side rendering time by 55% and component initialization time by 25%. Extending the change across GitHub required replacing thousands of dynamic `sx` styling props and transitioning imports from a compatibility wrapper to the CSS Module-based Primer package, aided by internal editor tools, codemods, and later Copilot coding agents. Engineers also separated GitHub’s multi-theme support from styled-components through further staged migrations. By June 2026, GitHub had removed `sx`, styled-components, and styled-system from its main product, turning an initial CSS conversion into a broader re-platforming of UI styling and theming while maintaining production stability.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Coding Assistant 4 1,596 558 143 +2%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.