The client went from injecting hundreds of CSS rules during a navigation to zero. Arguably the more valuable change, though, is that styling now has much clearer boundaries at Linear. Components have explicit styling contracts, precedence is deterministic, and many patterns that used to depend on convention or the cascade are now enforced by tooling.
I wrote about StyleX last year and maintained a very similar atomic CSS system at Yahoo. Linear just finished a 1,000-PR migration onto it, in part to help agents write UI at scale.
Beware the pitfall of choosing large API surfaces:
styled-components made this a particularly difficult migration to automate because it gives you a Turing-complete language, the full power of CSS, and a completely open API. There are countless ways to express the same intent, and at the time, it was uncomfortably easy for agents to output something that looked correct but wasn’t.
What I like about StyleX is its minimal API surface. Contrast to Panda CSS which provides a large API surface and countless ways to express the same intent. Simplicity wins.
Leave a Reply