<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7" -->

---
title: Styling Linear for the future with StyleX | daily.dev
description: Linear's engineering team migrated their React applications from styled-components to StyleX across more than 1,000 PRs, driven by performance concerns...
canonical: https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Styling Linear for the future with StyleX | daily.dev
og:description: Linear's engineering team migrated their React applications from styled-components to StyleX across more than 1,000 PRs, driven by performance concerns...
og:url: https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7
og:image: https://api.daily.dev/og/posts/9EMPZ51m7.png
og:image:alt: Styling Linear for the future with StyleX
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Styling Linear for the future with StyleX

**[Linear](https://daily.dev/sources/linear)** · 12 min read · 43 upvotes · 5 comments

## Summary

Linear's engineering team migrated their React applications from styled-components to StyleX across more than 1,000 PRs, driven by performance concerns (CSS-in-JS runtime overhead worsened after React 18's concurrent rendering), styled-components entering maintenance mode, and a desire for explicit styling contracts as agents contribute more code. The migration combined a deterministic codemod (open-sourced as styled-components-to-stylex-codemod), scoped AI agents, and custom lint rules and a type-aware repository checker to enforce conventions post-migration. They kept CSS Modules as a fallback for CSS-shaped problems and extended StyleX's theming to support Linear's dynamically generated color themes. Results: main-thread CPU work during rendering dropped 20-35% on view-heavy pages, translating to roughly 30% faster performance on mid-tier machines, with CSS rule injection during navigation going from hundreds to zero.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://linear.app/now/styling-linear-for-the-future-with-stylex>

## Questions this post answers

### Why did Linear migrate away from styled-components to StyleX?

Linear moved from styled-components to StyleX mainly for performance and maintainability: styled-components generates and injects CSS during rendering, which got worse after React 18 introduced concurrent rendering, and styled-components itself entered maintenance mode. StyleX does the bulk of style generation at build time, enforces deterministic style merging, and makes styling components from a distance deliberately harder, which matters more as AI agents write more of the codebase.

_Teams weighing a CSS-in-JS migration can track real-world tradeoffs like this one on daily.dev._

### What performance improvement did removing runtime CSS-in-JS style injection provide?

Removing runtime style injection by switching from styled-components to StyleX reduced main-thread CPU work by roughly 20 to 35 percent on view-heavy pages, translating to about 30 percent faster performance on a mid-tier machine. Client-side navigation went from injecting hundreds of CSS rules to injecting zero, since StyleX resolves styles at build time instead of during render.

_Developers benchmarking CSS-in-JS alternatives can follow performance comparisons like this on daily.dev._

### How can a large codebase migrate off styled-components using coding agents without breaking production?

A viable approach pairs a deterministic codemod (built with a large test suite) for the bulk conversion with narrowly-scoped AI agents for edge cases, starting with leaf components that don't wrap other styled components before touching shared primitives. Custom lint rules, a type-aware repository checker, and a bot flagging new styled-components usage in PRs prevent regressions while both systems coexist during the transition.

_Engineers planning agent-assisted refactors can compare migration strategies like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@mishatvoy** · 12 upvotes

> Just imagining doing 1,000+ PRs for a migration like this in 2020 without AI...💀

**@neumand** · 9 upvotes

> FYI, link is broken! [This](https://linear.app/now/styling-linear-for-the-future-stylex) should be the correct one.

**@ajaychoudhary80** · 6 upvotes

> Great example of AI-assisted refactoring done right—automation combined with deterministic codemods, linting, and type checks.

**@seeds** · 0 upvotes

> imma try code that sequence now.

**@agustinbarrientos** · 0 upvotes

> After the StyleX migration, I'd leave the repo checker in CI. Does it fail the build on the first new `styled-components` import?

## Similar posts on daily.dev

- [Linear Completes 1,000-PR Migration From styled-components to Meta's StyleX](https://daily.dev/posts/linear-completes-1-000-pr-migration-from-styled-components-to-meta-s-stylex-twjve9pqu) · InfoQ · 14 upvotes · 4 comments
- [Tailwind CSS vs. StyleX: A real migration with 20 components](https://daily.dev/posts/tailwind-css-vs-stylex-a-real-migration-with-20-components-pwvpzivec) · LogRocket · 72 upvotes · 13 comments

---

Tags: [#css](https://daily.dev/tags/css), [#react](https://daily.dev/tags/react), [#styled-components](https://daily.dev/tags/styled-components)

[View this post on daily.dev](https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Styling Linear for the future with StyleX","url":"https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7"},"datePublished":"2026-08-27T12:39:51.308Z","dateModified":"2026-10-15T02:22:55.888Z","description":"Linear's engineering team migrated their React applications from styled-components to StyleX across more than 1,000 PRs, driven by performance concerns...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2d83a22362fd279a01392e3735d731d1?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2d83a22362fd279a01392e3735d731d1?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Linear","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Linear","logo":"https://media.daily.dev/image/upload/s--ntgmTyoI--/f_auto/v1716187332/logos/linear","url":"https://daily.dev/sources/linear"},"commentCount":5,"discussionUrl":"https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":43},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":5}],"keywords":"css,react,styled-components","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Linear","item":"https://daily.dev/sources/linear"},{"@type":"ListItem","position":3,"name":"Styling Linear for the future with StyleX"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7","comment":[{"@type":"Comment","text":"Just imagining doing 1,000+ PRs for a migration like this in 2020 without AI…💀","datePublished":"2026-08-27T13:58:43.688Z","dateModified":"2026-08-27T13:59:02.958Z","url":"https://daily.dev/posts/9EMPZ51m7#c-bqBQwLXKt","author":{"@type":"Person","name":"Mikhail","url":"https://daily.dev/mishatvoy","image":"https://avatars.githubusercontent.com/u/74988200?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12}},{"@type":"Comment","text":"FYI, link is broken! This should be the correct one.","datePublished":"2026-08-27T15:24:00.431Z","url":"https://daily.dev/posts/9EMPZ51m7#c-5bKVzEFsa","author":{"@type":"Person","name":"David Neuman","url":"https://daily.dev/neumand","image":"https://avatars.githubusercontent.com/u/42482170?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9}},{"@type":"Comment","text":"Great example of AI-assisted refactoring done right—automation combined with deterministic codemods, linting, and type checks.","datePublished":"2026-08-28T04:17:32.627Z","url":"https://daily.dev/posts/9EMPZ51m7#c-tEOkHdMp6","author":{"@type":"Person","name":"Ajay Choudhary","url":"https://daily.dev/ajaychoudhary80","image":"https://media.daily.dev/image/upload/s--WkX8wDW2--/f_auto/v1780989706/avatars/avatar_QNZlI2SgVnNSx5PSRpCVx?_a=BAMAMiWQ0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"imma try code that sequence now.","datePublished":"2026-08-28T20:11:56.069Z","url":"https://daily.dev/posts/9EMPZ51m7#c-idDN5NL26","author":{"@type":"Person","name":"Sid Pant","url":"https://daily.dev/seeds","image":"https://lh3.googleusercontent.com/a/ACg8ocLLbc3XMLq-DXODkOR8hrOoa06ZCd1hmaigYTi_8D3epS3DCdo=s96-c"}},{"@type":"Comment","text":"After the StyleX migration, I’d leave the repo checker in CI. Does it fail the build on the first new styled-components import?","datePublished":"2026-09-10T23:13:10.340Z","url":"https://daily.dev/posts/9EMPZ51m7#c-SYUtKES4n","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/styling-linear-for-the-future-with-stylex-9empz51m7#faq","mainEntity":[{"@type":"Question","name":"Why did Linear migrate away from styled-components to StyleX?","acceptedAnswer":{"@type":"Answer","text":"Linear moved from styled-components to StyleX mainly for performance and maintainability: styled-components generates and injects CSS during rendering, which got worse after React 18 introduced concurrent rendering, and styled-components itself entered maintenance mode. StyleX does the bulk of style generation at build time, enforces deterministic style merging, and makes styling components from a distance deliberately harder, which matters more as AI agents write more of the codebase. Teams weighing a CSS-in-JS migration can track real-world tradeoffs like this one on daily.dev."}},{"@type":"Question","name":"What performance improvement did removing runtime CSS-in-JS style injection provide?","acceptedAnswer":{"@type":"Answer","text":"Removing runtime style injection by switching from styled-components to StyleX reduced main-thread CPU work by roughly 20 to 35 percent on view-heavy pages, translating to about 30 percent faster performance on a mid-tier machine. Client-side navigation went from injecting hundreds of CSS rules to injecting zero, since StyleX resolves styles at build time instead of during render. Developers benchmarking CSS-in-JS alternatives can follow performance comparisons like this on daily.dev."}},{"@type":"Question","name":"How can a large codebase migrate off styled-components using coding agents without breaking production?","acceptedAnswer":{"@type":"Answer","text":"A viable approach pairs a deterministic codemod (built with a large test suite) for the bulk conversion with narrowly-scoped AI agents for edge cases, starting with leaf components that don't wrap other styled components before touching shared primitives. Custom lint rules, a type-aware repository checker, and a bot flagging new styled-components usage in PRs prevent regressions while both systems coexist during the transition. Engineers planning agent-assisted refactors can compare migration strategies like this on daily.dev."}}]}
```

