Glean
Glean logoGlean · Feature trail

CSS Optimization and Migration

1 post · Aug 2026

What this trail covers

Glean has migrated its CSS architecture from inline styles to vanilla-extract, a zero-runtime CSS-in-JS solution. This migration was driven by the need for better performance and developer experience at scale. The process involved surveying CSS frameworks, evaluating tradeoffs between runtime overhead and developer satisfaction, and developing codemods to automate the conversion of existing inline styles to vanilla-extract's style declarations and classNames. The adoption of vanilla-extract has improved debugging with classNames and enabled more efficient CSS management.

All Glean trails