LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-julia
createdAtNov 20, 2026, 3:21 PM
updatedAtNov 20, 2026, 4:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/21572
authorneo-gemini-julia
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 21573 Retake neo-themed example covers in pages after button fill update
closedAtNov 20, 2026, 4:50 PM

Default neo-theme buttons to neutral surface and add primary ui

Closed v14.0.0/archive-v14-0-0-chunk-5 enhancementdesignaicore
neo-gemini-julia
neo-gemini-julia commented on Nov 20, 2026, 3:21 PM

Owned by @neo-gemini-julia for the Engine 14 cut (2026-11-23), per operator direction (2026-11-20), so curated contributor labels are omitted (ticket-create §4).

Context

In PR #21570 (resolving #21179), adding a standard {module: Button, text: 'Pause'} inside examples/grid/animatedRowSorting/Viewport.mjs's toolbar produced a filled electric-blue call-to-action button next to neutral TextField and NumberField controls. While #21393 (PR #21395) and #21399 (PR #21402) reduced default and toolbar button heights in neo-theme-neo-dark and neo-theme-neo-light from 48 px to 32 px (medium), both tickets explicitly left button fill out of scope (#21393: "The default button's fill: it stays primary. The defect is its size").

The Problem

  1. Every default Button (ui: null) in neo-theme-neo-dark and neo-theme-neo-light renders as a filled primary blue marketing CTA: resources/css/theme-neo-dark/button/Base.css:17-42 and resources/css/theme-neo-light/button/Base.css:17-42 bind --button-background-color* to --cmp-button-primary-surface-* (rgb(62, 99, 221)) with reversed text. Any contributor or maintainer placing {module: Button} in a toolbar, header, or hbox/vbox layout gets a loud primary CTA instead of a calm application control matching adjacent inputs.
  2. ui: 'primary' has no structural CSS rule: src/button/Base.mjs:162, apps/portal/view/examples/Overview.mjs:70 ('Open the 100,000 × 200 grid'), and examples/button/{base,effect}/MainContainer.mjs:192-193 already set ui: 'primary' (emitting .neo-button-primary), yet resources/css/src/button/Base.css only defines .neo-button-secondary, .neo-button-ghost, and .neo-button-tertiary. .neo-button-primary worked only because .neo-button itself was hardwired to primary blue.

The Architectural Reality

  • resources/css/src/button/Base.css:12-360 styles .neo-button from --button-* custom properties and overrides them per variant in &.neo-button-ghost, &.neo-button-secondary, and &.neo-button-tertiary.
  • All 5 themes (theme-neo-dark, theme-neo-light, theme-dark, theme-light, theme-cyberpunk) declare button/Base.css custom properties; per #18141 and buildScripts/util/check-theme-var-references.mjs, every --button-<variant>-* token read in resources/css/src/button/Base.css must be declared across all 5 theme sheets so nested theme scopes reset cleanly.
  • Audit of apps/portal/view/** shows every Portal button already declares an explicit ui (Overview.mjs:70 ui: 'primary', HeaderToolbar.mjs:54 / FooterContainer.mjs:55 ui: 'ghost', AudienceDoors.mjs / FeatureSection.mjs:125 / Examples controls ui: 'secondary') except apps/portal/view/home/parts/hero/Content.mjs:99-103 ('Get started'), which relied on ui: null being primary blue.
  • Classic themes (theme-dark, theme-light, theme-cyberpunk) already style default ui: null buttons as neutral chrome controls (#3c3f41 gradient in theme-dark).
  • Design authority: operator direction (@tobiu, 2026-11-20, session fdac7b58-4686-4e42-9233-7d3e0be881f4: filled blue buttons "only make sense for free floating scenarios, like the portal app landing section", never as the default inside toolbars, layouts, or headers) and src/button/Base.mjs:162 ("The size is independent of ui, which carries a state such as 'primary'").

The Fix

  1. resources/css/src/button/Base.css: Add &.neo-button-primary consuming --button-primary-background-color*, --button-primary-background-image, --button-primary-border*, --button-primary-badge-*, --button-primary-glyph-color*, --button-primary-ripple-background-color, and --button-primary-text-color* across rest, :hover, :active, and &.pressed (mirroring &.neo-button-secondary).
  2. All 5 resources/css/theme-*/button/Base.css sheets (theme-neo-dark, theme-neo-light, theme-dark, theme-light, theme-cyberpunk) + theme template if applicable:
    • Declare --button-primary-* in all 5 themes (--cmp-button-primary-surface-* + contrast text in theme-neo-dark and theme-neo-light; classic button neutral-default tokens in theme-dark, theme-light, theme-cyberpunk).
    • In theme-neo-dark and theme-neo-light, re-bind base --button-* (ui: null) to the neutral bordered control tokens (--cmp-button-secondary-surface-*, var(--cmp-button-borderwidth) solid var(--cmp-button-secondary-border-*), --sem-color-text-neutral-*, --sem-color-icon-neutral-*, pressed primary border + --sem-color-surface-primary-background). Keep --button-secondary-* intact so existing ui: 'secondary' callers remain unchanged.
  3. Portal Hero CTA (apps/portal/view/home/parts/hero/Content.mjs:99) & Neo.button.Base ui_ JSDoc (src/button/Base.mjs): Add ui: 'primary' on 'Get started' so the landing hero keeps its primary blue CTA alongside Overview.mjs:70, and document ui_ on Neo.button.Base.
  4. Build & Tests: Run npm run build-themes -- -n -e dev -t all, pass check-theme-var-references.mjs, update test/playwright/component/button/Pressed.spec.mjs to cover UIS = [null, 'primary', 'secondary', 'ghost', 'tertiary'], and assert in Playwright component tests that ui: null renders neutral bordered (transparent rest background + 1px neutral border + neutral text) while ui: 'primary' renders filled primary blue in neo-theme-neo-dark and neo-theme-neo-light without leaking across nested classic scopes.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Neo.button.Base ui: null vs ui: 'primary' (resources/css/src/button/Base.css, resources/css/theme-*/button/Base.css) Operator direction (2026-11-20) + src/button/Base.mjs:162 + #18141 ui: null renders neutral bordered control in neo-dark/neo-light; ui: 'primary' (.neo-button-primary) renders filled primary CTA in neo-dark/neo-light, while classic themes (theme-dark, theme-light, theme-cyberpunk) declare --button-primary-* equal to their neutral default; ui: 'secondary', 'ghost', and 'tertiary' remain unchanged Classic themes preserve neutral default and declare --button-primary-* for nested-theme parity src/button/Base.mjs ui_ JSDoc + CSS comments test/playwright/component/button/Pressed.spec.mjs + check-theme-var-references.mjs + before/after whole-surface frames
Portal Hero 'Get started' (apps/portal/view/home/parts/hero/Content.mjs) #20682 + #21393 AC-3 Explicitly sets ui: 'primary' to preserve hero primary CTA N/A Inline config Unit/component check + Portal hero before/after frames

Decision Record impact: none

Acceptance Criteria

  • AC-1: resources/css/src/button/Base.css defines &.neo-button-primary across rest, :hover, :active, and &.pressed, and all 5 resources/css/theme-*/button/Base.css files declare the complete --button-primary-* token set (node buildScripts/util/check-theme-var-references.mjs passes).
  • AC-2: In neo-theme-neo-dark and neo-theme-neo-light, a default Neo.button.Base (ui: null) inside toolbars, headers, or layouts renders with the neutral bordered control surface (transparent rest background + 1px border + neutral text), while ui: 'primary' renders the filled primary blue CTA (rgb(62, 99, 221) rest background + WCAG >= 4.5 label contrast in both rest and pressed states).
  • AC-3: apps/portal/view/home/parts/hero/Content.mjs ('Get started') explicitly sets ui: 'primary', preserving the Portal landing hero CTA alongside apps/portal/view/examples/Overview.mjs ('Open the 100,000 × 200 grid').
  • AC-4: test/playwright/component/button/Pressed.spec.mjs passes across [null, 'primary', 'secondary', 'ghost', 'tertiary'] in all 5 themes, and npm run test-unit / npm run test-components button & toolbar suites pass.

Out of Scope

  • Re-shooting affected Engine 14 example covers and component tiles into neomjs/pages (tracked in the dedicated follow-up ticket blocked_by this issue).
  • Changing button heights or size tokens (#21393, #21399).

Avoided Traps

  • Scoping the neutral surface to :where(.neo-toolbar) only: Leaves buttons inside hbox/vbox header containers and layout bars (Operations Desk, Move Video, Table Filtering, form steps) rendering as giant blue CTAs.
  • Declaring --button-primary-* in theme-neo-* only: Violates #18141 nested-theme token parity and fails check-theme-var-references.mjs when a classic theme sits inside a neo-themed host.
  • Removing .neo-button-secondary: Existing consumers (AudienceDoors, View on GitHub, Examples controls) pass ui: 'secondary' explicitly and must keep their exact appearance.

Related

#21393 · #21399 · #20735 · #21140 · PR #21570

Live latest-open + closed sweep: checked latest 20 open (#21568..#21346, 57 open — red band; standalone engine CSS leaf required across #21140 which already holds 40 sub-issues) + open and closed searches (button primary toolbar fill ui; Out of Scope / Avoided Traps read on #21393, #21399, and #20735) at 2026-11-20T14:20Z; no duplicate or blocking exclusion found (#21393 explicitly deferred fill). A2A in-flight claim sweep: checked latest 30 messages across all read states (2026-11-20T14:20Z); zero competing claim on button ui / default fill. MC sweep: "button size small medium large ui secondary tertiary toolbar default button height" & "too big blue buttons inside toolbars layouts headers example cover images pages repo", 13 results, surfaced #21393/#21399 size-only scope, no conflicting decision. Own-assignment sweep: 3 open (#21543 PR #21569 in review, #20987, #20671 — all bodies read), none overlapping.

Origin Session ID: fdac7b58-4686-4e42-9233-7d3e0be881f4 Retrieval Hint: "neo-theme-neo-dark neo-theme-neo-light default button fill neutral secondary ui primary neo-button-primary toolbar layout"