Repository navigation
Conversation
Layout, BlankView, NewBadgeView, and NewPointsView take an optional primaryTextColor. It colors links and other text only; buttons, charts, and progress bars keep primaryColor. Each mode uses it only when that mode's value is set, otherwise text falls back to primaryColor, so views without it look the same as before. Co-Authored-By: Claude Opus 5.5 <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.
Overview
Part of #681. Adds an optional
primaryTextColortoLayout,BlankView,NewBadgeView, andNewPointsView. It sets--mdhui-color-primary-text, so it colors links and other text only; buttons, charts, and progress bars keepprimaryColor. Each mode uses it only when that mode's value is set, otherwise text falls back toprimaryColor, so views without it look exactly as they do with #680. This lets a view pass contrast in dark mode, where one brand color can't work both as a button fill under white text and as text on a dark card.Stacked on #680; the base will move to
mainonce that merges.Security
Testing
Unit tests in
__tests__/components/presentational/Layout/Layout.test.tsxcover the text color set in both modes, set for one mode only, set without a brand, invalid or null, and not set. End to end: the ViewBuilder PR adds a picker for it.Documentation