Improving site performance by shipping more CSS
Curated from GitHub Engineering
The counterintuitive title immediately signals a strategic pivot. Many teams obsessively strip assets to minimize initial payload, often at the cost of runtime overhead. GitHub’s engineering team demonstrates that the hidden cost of CSS-in-JS—hydration delays, layout shifts, and JavaScript execution bottlenecks—can outweigh the benefit of smaller static files. This case study is valuable because it challenges the "less is always better" heuristic common in frontend optimization. It highlights how shifting complexity from the client to the build process can yield better Core Web Vitals. For practitioners, the key takeaway is to audit your JavaScript bundle not just for size, but for what it’s doing during render. If your CSS generation is happening in the browser, consider moving that logic to build time, even if it means shipping more static bytes.
How we fully migrated github.com away from CSS-in-JS. The post Improving site performance by shipping more CSS appeared first on The GitHub Blog .
— GitHub Engineering