登録して招待リンクを共有すると、動画再生報酬と紹介報酬を獲得できます。

Kenneth Skovhus
@kenneth_skovhus
Flipping bits to bring back magic at @linear
参加 February 2016
1.5K フォロー中    2K ファン
Thanks! Good question. Theming was the part of the migration I expected to fight us the most, and it turned into one of the more interesting pieces. Some context on why our setup is unusual. Linear themes are generated, not hand-authored: a custom theme is a few inputs (like base color, accent color, contrast), and from those we derive over a hundred color variables in LCH space. It goes further than most people expect: selection isn’t a background swap. When a row is selected, we regenerate the entire theme with the selected background as the new base, so labels, borders, and controls all re-derive against it. Same for focus, menus, and elevated surfaces, each scoped to its subtree by a nested ThemeProvider. That shape doesn’t fit StyleX’s built-in theming that well. Components author styles against ordinary stylex.defineVars tokens, but the tokens are placeholders: our ThemeProvider extracts the hashed custom-property names StyleX generated and injects one CSS rule per theme at runtime, scoped to the provider’s boundary. So essentially the setup is the same as before, just a lot more performant. Let me know if you have other questions.
もっと見る