fix(theme): primary button wears the accent in dark mode - #321
Merged
Conversation
Browser verification of the design system caught a real defect the green suite could not see: in dark mode the primary button rendered as a pale peach with dark text. Material derives a light `primary` for dark schemes, so the app's most important control was the one element on screen not wearing Lamplight Terracotta — a flat break of DESIGN.md's Rubrication Rule. Light mode had hidden it, because the amber seed's light `primary` happens to land near the token by luck. The fill is now set from JuiceTokens at the theme in both brightnesses, with the label flipping per mode: near-white ink on the deep light clay, page-dark ink on the lifted dark clay. Also ships the primary lift, the second and last shadow DESIGN.md sanctions and the only one it had left unimplemented. It rides Material elevation with a terracotta shadowColor rather than a literal BoxShadow, so the button lifts without spending the One Shadow Rule's budget, and no call site hand-rolls it. Warm-tinted per The Warm Shadow Rule — a neutral shadow on cream paper reads as plastic. Verified in the browser at both brightnesses, alongside the rewarmed campaign identity spines from #320, which render distinct in light and dark with Umber separating from Terracotta by value as intended. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
primaryfor dark schemes, so the app's most important control was the one element not wearing Lamplight Terracotta, a flat break of DESIGN.md's Rubrication Rule. Light mode hid it because the amber seed's lightprimarylands near the token by luck.JuiceTokensat the theme in both brightnesses, with the label flipping per mode: near-white ink on the deep light clay, page-dark ink on the lifted dark clay.elevationwith a terracottashadowColorrather than a literalBoxShadow, so the button lifts without spending the One Shadow Rule's budget and no call site hand-rolls it.Test plan
flutter analyzeclean (one pre-existinginfointest/embark_sheet_ui_test.dart, untouched here)flutter testpasses — 2192 tests#D0814Fwith page-dark label🤖 Generated with Claude Code