Repository navigation
Stand a choice's words as one paragraph on the line beside them, and keep a tall playground rail's actions whole - #6110
Merged
Merged
Conversation
…round rail's actions whole A choice (`.lf-choice`, the markup page-layout.md gives authors for a radio or checkbox) was an inline flex row centring its mark and words, mark first, so it took its baseline from the mark. A mark has no words, so the browser synthesizes its baseline from its foot, and a checked Web Awesome mark's from its dot's foot, one border higher. Whatever lined up with a choice by baseline, such as a legend in a baseline-aligned row, the words of a sentence or the next choice on a line, stood 2.5 to 4px below the choice's words, and a checked choice stood 1px lower than the others, so every selection moved the radios. The user saw both in a page's row of Case and Width radios. The baseline came with the shared face (#3506, 21 October) and the jump with the Web Awesome mark (#5230, 3 November); the feature gallery's Sample width radios have jumped since. Every surface Leaf draws stacks its choices one per line, so none of them showed it. A choice is now an inline grid: its words, baseline-aligned, give it its baseline, the mark centres on them, and the row centres in a finger's 44px target. Twelve stills states with choices or playgrounds are pixel-identical in Firefox under a mouse. The command reference's preference, which lays out three columns of its own, places its items by row again; under the grid's column flow its help took the title's column on touch. Under a coarse pointer the 16px type floor, which keeps iOS from zooming onto a text field, no longer reaches radios and checkboxes, which take no typing. Their marks keep 1.25em of their label's type, as controls.css says, where the floor drew a 20px mark beside 12.5px words, taller than their line. The playground rail, a Layout track bounded to the window, sized its rows to their content, so at 1728x999 a rail of five choice controls ran its bar of actions 15px past the bound, cut off behind the rail's own scroll. Its controls row now shrinks to the bound and, while the rail holds its height, the controls scroll in their pane and the bar stays whole, as in a full-height workspace. Tests: the choice test read the face after pressing back to the first radio, so it compared two identical states; it now reads it while the other radio is checked, and checks that the words share their group label's baseline. A new test holds a rail taller than the window. Both fail on main. A fresh reviewer read before/after captures, and Codex reviewed the diff and found the command reference's touch layout. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
previously approved these changes
Nov 16, 2026
…or every choice The previous commit made a choice a grid of its label's children so its words, not its mark, gave it its baseline. Each run of words and each element inside them became a cell of its own, though, so a label holding markup, such as "Use <strong>high quality</strong> for this image", wrapped each part in its own column: in a 220px box "image" broke under "for" rather than under "Use". With a tight line-height the words stood at the top of a row the taller mark set, 2 to 2.5px above the mark's centre, and a package's own grid of a choice's parts, the command reference's setting, fought the grid's column flow. Now everything after the mark is one run of words laid out as a paragraph, and the mark is floated into the label's start padding, centred on the first line and taking none of the words' room. A wrapped line starts under the first, a wrapped label's mark stands by its first line rather than between its lines, and the words still give the choice its baseline in Chromium, Firefox and WebKit, checked or not, left to right or right to left. The start padding holds the mark, so a package changes the room around it through `--lf-choice-pad` and `--lf-choice-gap`, never `padding` or `gap`. A playground toggle, a lone mark, stands centred in its target as a small grid; the command reference's setting keeps its own grid and drops the mark's room from its padding. The gap between mark and words took four values, 3.5px in a playground rail, 4px in its cards, 7px in visual review and 8px in the command reference. It is one theme token now, `--lf-choice-gap`, half the em of the choice's type as Web Awesome spaces its own radios, and the screenshot's pixel key reads it to line its words up with the choice above it. A rich playground candidate is a card whose head is the choice's label, padded nowhere at its foot, so the label's focus ring ran through its words and doubled the card's border. The card wears its radio's ring now, as an lf-options row does. The screenshot's Full frame and Outline changes choices wore the browser's own checkbox: #5865 renamed `.choice` to `.lf-choice` and missed the class `shot-view.js` passed to `offered()`. They wear Leaf's choice face again. The choice test adds a label holding markup that wraps, and checks that each line starts under the first; it fails on the grid. A fresh reviewer read captures of every choice surface; the gap, the card's ring and the pixel key came from that read. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 16, 2026
This was referenced Nov 16, 2026
max-sixty
pushed a commit
that referenced
this pull request
Nov 16, 2026
…where #6110 and #5963 moved them (#6193) The focus-ring sweep held two samples that later product changes had made stale. This PR updates both to where those changes deliberately moved the ring. - **notification-playground**: `lf-playground input[type=radio]` now resolves first to the Banner format card. #6110 made a candidate card wear its radio's ring, because the label's own ring "ran through its words" (its description). The sample still expected the `.lf-choice` label's ring. It now takes the rail's Tone radio (`#tone`), the dense choice it was added for in #3111, where the label still wears the ring. A second sample checks that the format card (`#format`) wears the `lf-playground-choice` ring. - **triage-board's panel field**: the sweep reaches this stop once the first one passes. #5963 moved the field's ring from the editor to the field's slot `.lf-fp-field`, so Send stays put. The sample expected `.lf-fp-field .lf-compose-field` and now expects `[data-lf-control-focus-visible] > .lf-fp-field`. No product code changes. Locally on Linux, before the change the test failed at notification-playground's radio with the message in #6182. With the change, every sample passes, both new expectations included. The test still fails on eight ring faults on `lf-ask` sections and a trace mark. These were hidden behind the stale samples and are a separate cause, filed as #6192. Closes #6182 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
An authored radio or checkbox (
<label class="lf-choice">, the markup page-layout.md gives authors) took its baseline from its mark's foot, so a legend, a sentence or the next choice beside it stood 2.5–4px below the choice's words, and a checked mark's dot raised that baseline a border, so every selection moved the radios. A choice was also a row of its label's parts, so a label holding markup ("Use high quality for this image") wrapped each part in its own column. Now everything after the mark is one run of words laid out as a paragraph, the words give the choice its baseline, and the mark hangs in the start padding, centred on the first line. The playground rail, bounded to the window, ran its bar of actions past its foot at 1728×999; its controls now give up that height and scroll in their pane, and the bar stays whole.To weigh: the gap between mark and words is one theme token,
--lf-choice-gap, half the type's em as Web Awesome spaces its radios, where it took four values (3.5–8px). Packages set the room around a mark through--lf-choice-padand--lf-choice-gap, since the start padding holds it; four of Leaf's own did. Under a coarse pointer the iOS text-field type floor no longer reaches radios and checkboxes, so their marks keep their label's size. A rich playground card wears its radio's focus ring, which ran through its words, and the screenshot's options choices wear Leaf's face again after #5865's rename missed them.The user asked for this on a Leaf page. A fresh reviewer read captures of every choice surface, and Codex reviewed the first round's diff.
Tests: the choice test checks the selection holds the face still, the words' baseline and a wrapped label holding markup; a new test holds a rail taller than the window. Each fails on main.