Skip to content

Review 4930

Cindy Zhang edited this page Aug 23, 2026 · 1 revision

#4930 — feat(core): conditional theme layer in defineTheme — a named mobile condition

cixzhang · open · view on GitHub

Verdict: comment

These records predate the Review Presentation format for the most part, so the problem/solution/API/theme-target/breaking slots are only filled where the review itself carried them. Reviews from 2026-08-23 on use the full template.

The review · 2026-08-16

Sticking with flat conditions here. Light and dark already sit at the root, and a condition should work the same way rather than growing a second grammar for the same idea. The one thing worth solving separately: root keys growing without bound is ugly to author against, so custom breakpoints probably want their own space.

One bug that outlives that: light-dark() used only inside a mobile block skips the color-scheme guard the base path emits, so the two distribution modes diverge. Built both themes to check — base emits :root {color-scheme: light dark}, the mobile-only twin emits none.

Needs a merge with main; #5067 rewrote both blocks this touches, and moved deepMergeComponents into mergeComponents.ts.

Smallest slice after that merge is tokens-only mobile, no color or typography axes.

[Reviewed by Robohands and the maintainer]

Clone this wiki locally