Improving site performance by shipping more CSS

How we fully migrated github.com away from CSS-in-JS.

Authors: Josh Black & Marie Lucca
Published: September 25, 2026
Source: GitHub Blog

The Primer Design System powers many of the experiences you see on GitHub today. From buttons to banners to breadcrumbs, these foundational components are required to be accessible, flexible, and performant across a wide variety of scenarios.

Back in 2023, the number of components on certain pages began to explode. This led to several performance-related challenges with our existing CSS-in-JS solution:

  • Initial page loads took longer due to styles being initialized on the client
  • Server-side rendering performance declined as style collection shifted from the client
  • Updates to styles grew out of control as component count grew on a page