Repository navigation
Split form field state colors into text and decoration tokens (#801) - #806
Draft
adamkudrna wants to merge 1 commit into
Draft
adamkudrna wants to merge 1 commit into
adamkudrna wants to merge 1 commit into
Conversation
Text needs 4.5:1 contrast, while borders need only 3:1. Add `--rui-color-state-<state>-text`, `-text-hover` and `-text-active`, and use them for the surrounding text and links of form fields in states. For the warning state, darken `--rui-color-state-warning` so the border uses it directly. Warning links get the darker colors of the warning text.
adamkudrna
had a problem deploying
to
pr-preview/pr-806
November 30, 2026 18:58 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Text needs 4.5:1 contrast, while borders need only 3:1. Form field states get separate text tokens, so a theme can darken text without darkening decorations.
Changes
--rui-color-state-<state>-text,-text-hoverand-text-activeforvalid,invalid,warningandchanged.--rui-color-state-warningfrom#f59f00to the former-hovervalue and use it for the warning border.-hovermoves between the base and-active.Visual changes in the default theme
--rui-color-state-warningand-hoverare darker wherever used directly.Migration for custom themes
--rui-color-state-warninginstead of-hover.-text(by default-active) instead of the base,-hoverand-activetokens.Review notes
-text*aliases resolve on:root, so overriding a state color on a subtree no longer recolors links in states. Theming docs override tokens on:rootonly.-text-hoverand-text-activemix toward black, which lowers contrast in a dark theme unless overridden.-textdefaults are derived.$state-warning-lightis hard to follow.valid,invalidandwarningtext is below 4.5:1, and thewarningborder is below 3:1.Closes #801