LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 18, 2026, 10:17 PM
updatedAtNov 18, 2026, 11:08 PM
githubUrlhttps://github.com/neomjs/neo/issues/21403
authorneo-opus-ada
commentsCount0
parentIssue21329
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 18, 2026, 11:08 PM

A range field's input has no height; its slider draws outside it

neo-opus-ada
neo-opus-ada commented on Nov 18, 2026, 10:17 PM

Sub of #21329. Owned by @neo-opus-ada for the Engine 14 cut (Mon 23 Nov), so no curated labels: it decides whether the range field's tile publishes, which #21140's investigation 1 answers by Thu 19 Nov.

Context

Measured on dev 5b01310896, examples/form/field/range at 1024 × 768, labelPosition: 'left', in Playwright's Chromium, WebKit and Firefox:

Engine Input box Label's middle (y) Input's middle (y)
Chromium, WebKit 196 × 0 px 357.5 362.5
Firefox 196 × 17.3 px 358.1 363.1

The slider still looks right and takes clicks, because its track and thumb paint outside the input. What reads the box sees nothing:

  • Playwright treats the input as hidden: locator('.neo-rangefield-input').first().waitFor() times out with locator resolved to hidden <input … type="range" … class="neo-rangefield-input"/>.
  • buildScripts/docs/captureExamples.mjs --tiles skips boxes under 2 px, so the form-field-range tile comes out 160 × 120 with only the label (my defect-note, 18 Nov 20:14Z). It is held out of neomjs/pages#113.
  • With labelPosition: 'top' the box sits at y 377, below the field's own box (y 344 to 371).

The Problem

Range.css places the slider with three offsets that cancel out: margin-top: 12px on the input, -8px on the track, -5px on the thumb. With -webkit-appearance: none, Chromium sizes the input from its track: removing the track's margin makes the input 4 px tall, a 10 px track makes it 10 px, so 4 px minus 8 px leaves it at 0. Firefox keeps an intrinsic height, 5 px below the label's middle.

The Architectural Reality

  • resources/css/src/form/field/Range.css: the offsets above. The themes set only --rangefield-thumb-background and --rangefield-track-background.
  • src/form/field/Range.mjs construct() replaces the input's neo-textfield-input class with neo-rangefield-input, so Text.css's min-height: var(--textfield-input-height) for text inputs does not reach it, and Range.css sets none.
  • .neo-textfield has a fixed one-row height (Text.css), so a top label pushes the input below the field's bottom edge before and after this fix. That height belongs to the whole text field family.

Design authority: #21140, investigation 1: "Can one recipe capture every workbench stage's component by its own rectangle, in the dark theme? … An entry the recipe cannot capture stays unpublished." The recipe's tileRegion takes a component's content as "the union of leaves, media, text and decorated boxes", and an input counts, so the input's box has to hold what it paints.

The Fix

In resources/css/src/form/field/Range.css only:

  • .neo-rangefield-input: drop margin-top: 12px and add min-height: 15px, the thumb's height.
  • ::-webkit-slider-runnable-track and ::-moz-range-track: drop margin-top: -8px.
  • ::-webkit-slider-thumb: margin-top: calc((4px - 15px) / 2). Chromium and WebKit start the thumb at the track's top edge, so this centres the 15 px thumb on the 4 px track.
  • ::-moz-range-thumb: drop margin-top: -5px. Firefox centres the thumb on its own.

Checked in all three engines with these rules injected (revert standing in for each dropped declaration). The input is 196 × 15 px (17.3 px in Firefox) and its middle matches the label's to 0.1 px. The slider still draws on the label's middle line. With a top label, the 15 px box starts below the label.

Acceptance Criteria

  • AC-1: A left-labelled range field's input box is at least 15 px tall and its middle is within 1 px of the label's middle.
  • AC-2: With labelPosition: 'top' the input box is at least 15 px tall and starts below the label's box.
  • AC-3: A click on the track still sets the value at that point. This is a guard and passes on dev too.
  • AC-4: A component spec, test/playwright/component/form/field/Range.spec.mjs, covers AC-1 to AC-3: AC-1 and AC-2 red on dev, green at head.
  • AC-5 (post-merge): captureExamples.mjs --tile examples/form/field/range writes the tile with its slider, and it joins the field tiles on neomjs/pages.

Out of Scope

  • The text field family's fixed one-row height under a top label (Text.css).
  • The focused slider shows no focus indicator (outline: none, nothing replaces it). Captured as a defect-note.
  • Tick marks (afterSetTickmarks is a todo) and the value-in-label spec (#19145, a unit spec in another file).

Avoided Traps

  • height: 15px instead of min-height: in a top-label column, the input's flex: 1 shrinks a fixed height to 6 px (measured). min-height holds it.
  • Giving the input back neo-textfield-input: that class brings the text input's border, padding and background.

Related

  • Parent: #21329. Consumers: #21140 (investigation 1), #21333 (the tile list), neomjs/pages#113 (the field tiles, without range).

Live latest-open + closed sweep: checked latest 20 open plus open and closed search ("range slider", "rangefield", "range field", "slider thumb"; open #19145 and closed #772 and #830 read) at 2026-11-18T21:16Z; no equivalent or prior exclusion. Backlog: 81 open (red), folded under #21329. A2A in-flight claim sweep: last 30 messages, no claim on the range field. MC sweep: "range field input has zero height, slider track and thumb draw outside the input box", 5 results, no prior decision. Own-assignment sweep: 7 open; #21329 is the parent, none overlapping.

Retrieval Hint: "range field input zero height slider draws outside its box tile crop"

tobiu referenced in commit fbfdbfb - "fix(form): a range field's input box holds its slider (#21403) (#21404) on Nov 18, 2026, 11:08 PM
tobiu closed this issue on Nov 18, 2026, 11:08 PM