---
id: 20260926-T0-09
title: "GitHub全面弃用CSS-in-JS，靠多写CSS提升页面性能"
title_en: "GitHub Ditches CSS-in-JS, Ships More CSS to Boost Site Performance"
url: https://ai.daily.yangsir.net/daily/20260926-T0-09
issue_date: 2026-09-26
publish_date: 2026-09-25T15:00:00.000Z
category: insight
source_name: "GitHub Blog"
source_url: https://github.blog/engineering/architecture-optimization/improving-site-performance-by-shipping-more-css/
---

# GitHub全面弃用CSS-in-JS，靠多写CSS提升页面性能

GitHub完成将github.com从CSS-in-JS方案迁移到传统CSS的工程改造。团队发现CSS-in-JS在运行时注入样式会拖慢页面渲染，改为直接输出静态CSS文件后，页面加载速度得到改善。GitHub在官方博客中详细介绍了迁移过程和性能数据。对于大型前端项目而言，这一案例说明CSS-in-JS并非总是最优解，构建时提取静态样式在性能上可能更优。

## English Version

**GitHub Ditches CSS-in-JS, Ships More CSS to Boost Site Performance**

GitHub has fully migrated github.com away from CSS-in-JS to plain static CSS. The team found that runtime style injection slowed page rendering, and switching to pre-built CSS files improved load performance. GitHub detailed the migration process and performance gains on its blog. For large front-end projects, this case shows that CSS-in-JS isn't always optimal — extracting static styles at build time can deliver better performance.

---

**来源**：[GitHub Blog](https://github.blog/engineering/architecture-optimization/improving-site-performance-by-shipping-more-css/)

**详情页**：https://ai.daily.yangsir.net/daily/20260926-T0-09

---

*智语观潮 · Daily — https://ai.daily.yangsir.net/llms.txt*