LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 19, 2026, 9:48 PM
updatedAtNov 20, 2026, 1:23 AM
githubUrlhttps://github.com/neomjs/neo/issues/21514
authorneo-opus-ada
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 20, 2026, 1:23 AM

neo-dark uses color steps it never defines, so error states lose color

neo-opus-ada
neo-opus-ada commented on Nov 19, 2026, 9:48 PM

Context

The frames of #21405 in neo-theme-neo-dark show an invalid email field with near-white error text and a near-white border; in neo-light both are red. Measured on 19 Nov on a field with neo-invalid neo-is-touched: .neo-textfield-error computes color: rgb(240, 241, 244) at 11 px, and its input wrapper's border has the same color (defect-note aa1718e0). apps/form (#21492) opens in neo-dark, and Forms & Fields captures its field tiles dark, so Friday's dark-theme reads (#21140) see invalid fields with no error color.

The Problem

resources/css/theme-neo-dark/form/field/Text.css:7 sets --textfield-border-color-invalid: var(--red-500), and nothing under resources/css/ defines --red-500. A declaration whose var() resolves to nothing is invalid at computed-value time. The property falls back to its inherited or initial value: the text color for color and borders, transparent for backgrounds. No commit has ever defined a red step: git log -S'--red-500:' over resources/scss and resources/css returns nothing. The fault therefore predates the plain-CSS move (#21225).

The gap is wider. I scanned every theme for var(--x) without a fallback, against the custom properties that theme and resources/css/src define:

Theme Undefined Used by
neo-dark --red-100, --red-500, --red-800, --red-900, --orange-500, --orange-700, --yellow-600, --yellow-700, --blue-100, --blue-800 form/field/Text.css, FileUpload.css, ComboBox.css, component/StatusBadge.css, Toast.css, Process.css
neo-dark --sem-color-surface-neutral-contrast, --sem-color-bg-subtle, --sem-color-bg-hover, --sem-color-text-neutral-disabled, --sem-color-icon-neutral-disabled, --sem-color-text-primary-contrast, --sem-color-text-primary-highlighted Global.css, button/Base.css, the docs MembersList, calendar views, the Portal footer
neo-light --sem-color-surface-neutral-contrast, --sem-color-bg-neutral-strong, --sem-color-text-neutral-disabled, --sem-color-icon-neutral-disabled, --sem-color-text-primary-contrast Global.css, button/Base.css, the Portal footer
cyberpunk --cyber-yellow grid/header/Button.css

--fa-style-family-classic (in every theme's CheckBox.css) is Font Awesome's own runtime variable, so it is not a defect.

Prior art: in January a session fixed the same class of fault (semantic token names that did not exist, in both light and dark) with no guard, and it came back.

The Architectural Reality

  • resources/css/theme-neo-dark/Global.css defines the --gray-*, --green-* and --purple-* scales and no red, orange, yellow or blue scale.
  • neo-dark already has one defined error red: --selectfield-error-color: #ff8a80.
  • The other themes use brown for --textfield-border-color-invalid; only neo-dark points at a palette step.
  • The pre-commit hook runs buildScripts/util/check-theme-coverage.mjs and check-theme-value-files.mjs. Neither resolves var() references against definitions, so these all passed.

Design authority: "--textfield-border-color-invalid : var(--red-500);" — resources/css/theme-neo-dark/form/field/Text.css:7, the theme's own declaration that an invalid field is red; neo-light's brown says the same.

The Fix

  1. In neo-dark's Global.css, define the ten missing palette steps, derived the way the theme's existing scales are. --red-500 should match --selectfield-error-color.
  2. For each missing semantic token in neo-dark and neo-light, either define it or correct the name, if it is a typo of an existing token, as in January's fix. Define --cyber-yellow in cyberpunk, or correct its reference.
  3. Add a check beside the two theme checks: every var(--x) without a fallback in a theme resolves to a property that the theme or resources/css/src defines. Allow-list Font Awesome's runtime variables. It runs in the same pre-commit step and CI job.

Acceptance Criteria

  • In neo-dark, an invalid text field shows a red border and red error text: their computed color differs from the text color in examples/form/validation and apps/form.
  • In neo-dark, a status badge's error, warning and info states, and a danger toast, show their own colors.
  • The check passes on every theme with only the Font Awesome allow-list, and it fails on a commit that adds an undefined reference (the PR shows that failure on a scratch edit).
  • Before and after frames of an invalid field, a status badge and a toast in neo-dark are on the PR.

Out of Scope

  • The other themes' invalid color (brown).
  • The touch height of form fields (defect-note a39ef19c).

Related

#21405 (where it showed) · #21492 (apps/form opens in neo-dark) · #21225 (theme sources became plain CSS) · #21140 (Friday's read)

Ownership: @neo-opus-ada, needed before the Fri 20 Nov dark-theme reads, so no curated labels.

Live latest-open + closed sweep: checked the latest 20 open, plus open and closed searches ("theme undefined variable", "neo-dark palette", "neo-dark undefined color variable", "theme var undefined palette red"), at 2026-11-19T20:48Z. No equivalent and no prior exclusion found. Backlog: 70 open (red band); there is no owning theme epic to fold into. A2A: the latest 30 messages in all read states carry no claim on this scope. Memory Core: the January fix of wrong semantic token names is the only prior art. Own assignments: 5 open, none on themes.

Origin Session ID: 038e37ef-72ba-4815-a820-288b19cb55ba Retrieval Hint: "neo-dark undefined palette variables error state falls back to text color"

⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code