LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 18, 2026, 9:27 PM
updatedAtNov 19, 2026, 2:54 AM
githubUrlhttps://github.com/neomjs/neo/issues/21399
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 21393 The neo themes give every button the Portal''s 48 px call-to-action size
blocking[]
closedAtNov 19, 2026, 2:54 AM

A button takes a size: small, medium or large

Closed v14.0.0/archive-v14-0-0-chunk-4 enhancementdesignai
neo-opus-grace
neo-opus-grace commented on Nov 18, 2026, 9:27 PM

Owned and in progress: the operator's direction of 2026-11-18, so no contributor labels.

Context

The operator wrote this on 2026-11-18, after #21393: "buttons should have different sizes available. could be a config. apps/workstation and other demo apps already use compact styling, but the implementation feels messy. toolbar buttons definitely by default compact." #21395 makes the neo themes' default button compact and resets every toolbar to it. A button still cannot ask for a size, so consumers hand-roll one.

Later that day the operator reported the calendar: "too big blue buttons", the header's arrows taller than Today, and the settings button taller than its neighbours, and asked whether icon and text buttons now differ in height in general.

The Problem

These hand-rolled sizes are on dev, at ecea698bff. The list comes from a probe over resources/css/src/** for rules and --button-* variables that size .neo-button. It was run again with POSIX classes, since git grep -E does not read \s. The calendar's sizes are configs, which a CSS probe cannot see.

One-off compact sizes, migrated by this ticket:

  • apps/workstation:
    • Workspace.css: the workspace toolbar's --button-height: 32px.
    • Viewport.css: the row action's height: 30px.
  • Five grid examples (countries, export, filtering, headerGroups, pinnedColumns): .neo-button {padding: 8px 12px}, and export adds height: auto.
  • src/calendar/view/MainContainer.mjs: Today and the four view buttons pin height: 24. The menu, arrow and settings buttons take the toolbar's size, 32 px in the neo themes, so one header row mixes 24 and 32 px.

Sizes that stay, each for a reason:

  • Workstation's tour bar, 34 px: its actions sit in one line with the arrangement switch, whose 28 px segments make one 34 px pill (#15164, pinned by WorkstationNL.spec.mjs).
  • The Portal's doors (42 px and 36 px) and its examples build control (14 px text): the Portal keeps its design.
  • apps/route's header (14 px serif): a typographic skin on a classic-theme app.
  • examples/ConfigurationViewport.css's theme switch (44 px, !important): a touch target on phones.
  • The desktop taskbar (40 px): its own size, which #21395 already lets win.

Each one-off picks its own number. None of them reads from the button's config, and a theme change does not reach them.

Icon and text buttons: in the neo themes a size fixes the height, so both share it; a probe over the 42 multi-button toolbars of the neo-themed examples and apps found a mixed row only in the calendar. The classic themes size a button by its content: the text's 11 px line box against the glyph's 12 px made an icon button one pixel taller than a text button.

The Architectural Reality

  • src/button/Base.css sizes every button from --button-height, --button-min-width, --button-padding and --button-text-font-size.
  • With #21395, both neo themes set the compact values on :where(.neo-theme-neo-*) and :where(.neo-theme-neo-* .neo-toolbar). The Portal's viewport and header opt back into --cmp-button-height (48 px). The classic themes size a button by its content (--button-height: initial).
  • Neo.component.Base#ui maps to a neo-${ntype}-${ui} class (src/component/Base.mjs:1039). A neo-button-small class would share that namespace.
  • Prior art: Clio's cockpit-bar scaling (2026-09-25) found that re-valuing scoped variables is the consistent way to scale buttons. A size config re-values the same variables, on the button itself.
  • Design authority: the operator, 2026-11-18, in session: "buttons should have different sizes available. could be a config." and "toolbar buttons definitely by default compact."

The Fix

  1. Neo.button.Base#size_: the values are null (the default, where the context decides: compact in a toolbar), 'small', 'medium' and 'large'. beforeSetEnumValue validates the value, and it maps to a neo-size-<size> class, outside ui's neo-button-<ui> namespace.
  2. src/button/Base.css: each size class re-values the four variables from size tokens, so an explicit size wins over its context.
  3. Size tokens in every theme:
    • The neo themes step 24, 32 and 48 px, with matching padding and text.
    • The classic themes get their own steps, and their text line height is the glyph's 12 px.
    • #21395's compact block and the Portal's opt-in read the medium and large tokens instead of repeating the values.
  4. Migration: each hand-rolled size above moves to a size config, or goes where the compact default already covers it (the grid examples' padding). The calendar header's nine buttons take size: 'small', 24 px in the neo themes, the height its pinned buttons had. Each one is checked against frames.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Neo.button.Base#size_: new config the design authority above 'small', 'medium' or 'large' gives the button that size in every theme, over its context, with text or with only an icon. null, the default, keeps the context's size. An unknown value is refused by beforeSetEnumValue. the config's JSDoc and the class summary a unit arm for the config → class mapping; a component spec measures each size in each theme, for a text and an icon button
Size tokens per theme: --button-size-{small,medium,large}-{height,padding,font-size} Fix 3 Each theme defines the three steps. The neo themes' compact default and the Portal's opt-in read them. none the theme files the component spec; the button inventory before and after

Acceptance Criteria

  • AC-1: size: 'small' | 'medium' | 'large' sets the button's height, padding and text in all five themes, including inside a toolbar or the Portal, and at phone widths. null keeps the context's size. A button with only an icon is as tall as one with text at each size. A component spec measures each size in each theme.
  • AC-2: size changes at runtime, and the class follows, independent of ui both ways (unit).
  • AC-3: The one-off sizes in workstation, the five grid examples and the calendar header are gone: each takes the default or a size, with frames before and after. The sizes that stay keep their reasons in The Problem.
  • AC-4: The Portal and #21395's compact default do not change: the button inventory over the neo-themed examples and apps reads the same before and after.

Out of Scope

  • The button's colour and ui, including the neo themes' pressed state of a toggle group, which looks like the unpressed one.
  • A size for icon-only buttons beyond min-width.
  • The Portal's buttons: they keep the viewport opt-in.

Avoided Traps

  • A size class in ui's neo-button-<value> namespace: ui: 'small', or ui: 'size-large' against a neo-button-size-large class, would let one config remove the other's class.
  • A default of 'medium': an explicit default would override every context, so a toolbar or the Portal could no longer set the size.
  • A pixel number per consumer: the next consumer picks another one.
  • The glyph taking the text's line height: 60 rules restyle .neo-button-glyph, and a fixed line box would clip the enlarged glyphs. The text takes the glyph's instead.

Related

#21393 and #21395 (the theme blocks this edits; this PR rebases after #21395 merges), #21140 (the examples cornerstone), #15164 (the Workstation tour bar's height).

Live latest-open + closed sweep: checked the latest 20 open (82 open, red band; #21393 is the closest, and its Out of Scope names this config) + open and closed searches (button size config, button size, small medium large button; no owner or exclusion) at 2026-11-18T20:26Z. A2A claims of the last 15 messages read, with no claim on this scope. query_raw_memories on the symptom found Clio's scoped-variable conclusion above. My assigned issues read: #21393 is the predecessor.

Amended 2026-11-18 (author), after the operator's calendar report: the calendar header joins the migration, the icon-button height joins AC-1, and the Workstation tour bar moves to the sizes that stay, after #21402's e2e run caught it.

Retrieval Hint: "neo button size config small medium large compact toolbar workstation calendar header icon button height hand-rolled"

tobiu referenced in commit a56015e - "feat(button): a button takes a size: small, medium or large (#21399) (#21402) on Nov 19, 2026, 2:54 AM
tobiu closed this issue on Nov 19, 2026, 2:54 AM