가입 후 초대 링크를 공유하면 동영상 재생 및 초대 보상을 받을 수 있습니다.

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.
더 보기