Skip to content

Fill a picked option with a neutral grey instead of the chips' beige - #6424

Merged
max-sixty merged 3 commits into
mainfrom
selected-option-color
Nov 18, 2026
Merged

max-sixty merged 3 commits into
mainfrom
selected-option-color

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

A picked option now stands on a neutral grey, the card mixed 18% toward the settled colour, instead of the chips' beige ground it took after #6098. On the reading theme that beige has three times the paper's chroma (OKLCH 0.937 / 0.017 against the card's 0.997 / 0.005), so across a whole card it reads as khaki, and as olive under the pointer right after the click. It also sat level with the pointer's grey wash, so a picked card differed from a hovered one only in hue, and a plain chip on the picked card lost its ground.

Just picked, pointer still on the card, before → after (light, then dark):

Worth weighing: the fill stays, rather than a ring alone, because with the keyboard on a group the blue focus ring covers the pick's ring and a digit replaces its check, so the fill is the only thing left saying which card is picked. The grey is a step deeper than the pointer's wash for that reason, which makes the picked card under the pointer the heaviest block on the page. An opened settled group now washes a hovered option in the same grey as a live one, and a picked card standing alone takes the picked ground too, so the pick is never the one card without a fill. The settled tint stays on answers, Done and the thread summary region (#6379).

Max asked whether the brownish pick was intended; it came from reusing the chip token. The grey follows his lean away from it and is his to reverse.

Tests: the picked-cell ring test now measures the ring against the cell's own ground, and still fails with the ring removed; leaf-dev stills shows only option picks and the settled hover changing. The test job's browser type check fails on the undefined placement and reads in browser/runtime/anchor-placement.js, inherited from main, which #6420 and #6422 fix.

This was written by Claude Code on behalf of max-sixty

…h, not the chips' beige

Since #6098 a picked option card or row filled with the settled tint,
which is the chips' ground (`--lf-chip`). On the reading theme that ground
has three times the paper's chroma (OKLCH 0.937 / 0.017 / 94° against the
card's 0.997 / 0.005), which reads as beige on a chip and as khaki over a
whole card; under the pointer, as it is right after the click, it deepened
to olive (0.887 / 0.016). It also stood at the same lightness as the
pointer's grey wash (0.942), so a picked card differed from a hovered one
only in hue, and a plain chip on the picked card lost its ground entirely.

A picked cell now takes `--lf-picked-ground`, the card mixed 18% toward
the settled colour: a neutral grey (0.890 / 0.006 light, 0.356 / 0.010
dark) a step deeper than the pointer's wash, about 1.5:1 against the card.
The fill is what still says "picked" where the focus ring covers the
pick's ring and a digit replaces its check, so a ring-only pick, tried
first, left the keyboard on the picked card indistinguishable from the
keyboard on any other. Chips keep their ground on it, so the rule that put
an ok chip back on the card's ground goes. An opened settled group's
option now takes the same grey wash under the pointer as a live one,
instead of the chips' beige.

Max asked whether the brownish pick was intended; it came from reusing the
chip token, not a choice of colour. The grey follows his lean away from
the brown and is his to reverse. The settled tint stays on answers, Done
and the thread summary region, which he picked in #6379.

Tests: the picked-cell ring test now measures the ring against the cell's
own ground rather than the settled tint, and still fails with the ring
removed. `leaf-dev stills` shows only option picks and the settled hover
changing.

> _This was written by Claude Code on behalf of max-sixty_
A card standing alone, as in an opened settled group or a group whose
options hold pictures, marked its pick with its border alone, so with the
pointer on another card that card was the only one filled and read as the
more chosen. Every form of option now stands its pick on the picked ground
and edges it in the settled colour.

> _This was written by Claude Code on behalf of max-sixty_

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The red test job comes from main, not this change. pnpm run check stops at browser/runtime/anchor-placement.js (savedAt calls the undefined placement() and reads()), and tsc --project browser/types/tsconfig.json reports the same three errors on main at 667b6c7. #6422 and #6420 are fixing it. The edited ring test passes locally.

@max-sixty
max-sixty merged commit 4fbd345 into main Nov 18, 2026
4 of 5 checks passed
@max-sixty
max-sixty deleted the selected-option-color branch November 18, 2026 23:01
max-sixty pushed a commit that referenced this pull request Nov 19, 2026
…and keep muted words AA on a picked option (#6455)

Two causes made
`test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure`
fail on `main`. This PR fixes both, and the test now passes. Before the
change it failed at the offset, then at brackets, then at the axe check.

**Brackets on edge boxes.** A box whose marks stand on its own frame
declared `--lf-ring-at: 0`. The bracket clip in
`browser/styles/components/surfaces.css` adds that gap to the band width
inside a `calc`. Both properties are registered with `syntax: "*"`, so
the unitless `0` stays a number, and the polygon is invalid at
computed-value time. So the trace or the Alt aim on any such box drew a
whole ring instead of brackets. That covers fields, marks, reactions, a
diff's and a file editor's shadow boxes, and, since #6408, the joined
option group. `base.css` now registers `--lf-band-gap` as `<length>`
(initial `0px`). A box's `0` therefore computes to `0px` before the
`calc` reads it, and that holds for a package's boxes too, since
`package-themes.md` tells authors to write `0`. `--lf-ring-at` keeps
`"*"` and no initial value, so a box that states nothing still falls
back. Leaf's own edge declarations, and the three `outline-offset: 0`
declarations `test_every_ring_stands_at_a_kind_of_box` holds to the same
kinds, are respelled `0px`. That test names it as the kind's one
spelling. Positions don't change, because `0` and `0px` place an outline
the same. The only visible effect is that gestures on these boxes draw
brackets again.

**Contrast on a picked option.** #6424's picked ground mixes the card
18% toward the settled colour. On the reading theme's light paper, that
leaves `--lf-muted` words on a picked option at 4.39:1 (axe, on the
`.lf-ref` § reference). `tokens.css` promises that token 4.5:1 on every
surface the layer paints, and the option's own mark word is muted too.
The mix is now 15%, which measures about 4.6:1 in light and 5.2:1 in
dark. It is still a neutral grey and still deeper than the pointer's
wash, so #6424's reasons for the fill hold. The picked row is one step
lighter:

| | before | after |
|---|---|---|
| light |
![](https://github.com/user-attachments/assets/c953e9c5-dc63-4a34-b179-99ebd686ad56)
|
![](https://github.com/user-attachments/assets/be688fa6-4cf7-4de6-ad47-95fda2dc0224)
|
| dark |
![](https://github.com/user-attachments/assets/e2e538ab-385a-4da5-9dc6-864ada876584)
|
![](https://github.com/user-attachments/assets/cb6515e8-e616-41f9-aabc-495f3cfd78e5)
|

Captured with `leaf-dev stills --state ship-option-references` (and
`--scheme dark`). `plan-option-picked`, `plan-option-card-picked` and
`settled-option` show the same lighter pick and nothing else. Max chose
the depth of the grey, so whether 15% is the right step is his call. The
other route would be to darken `--lf-muted`, which would change every
page.

**Test.** The margin status test expected the trace at
`--lf-focus-region-gap`. Since #6408, a box that draws its own frame
stands its marks on that frame. The test now reads where the traced box
says its marks stand (`--lf-ring-at`) and expects 0 on the framed group.

Checks: the failing test and `tests/model/test_interact_layer.py` pass,
as do the ring, aim, trace, pick and contrast tests in
`tests/browser/controls/test_rings.py`, `test_render_aim.py` and
`test_render_options.py` (161 passed). With the hover change, the same
files gave 198 passed and one failure, the quoted-widget test's
chosen-card expectation, which now passes as updated. I also ran the
margin status test with the joined option group declaring `0`. It fails
without the `--lf-band-gap` registration and passes with it.

**Hover on a pick.** The aim wash deepened a picked option 8% toward the
ink, in a live joined cell (pointer or keyboard aim) and in an opened
settled group. On the 15% picked ground that left muted words at 3.98:1
in light and 4.15:1 in dark. A pick now keeps its picked ground under
the pointer and the keyboard aim: it already stands deeper than the
wash, and its settled ring and the pointer cursor still answer. An
unpicked option's wash is unchanged. A chosen settled card no longer
washes under the pointer, so
`test_a_quoted_widget_exhibits_without_taking_input` now expects a
chosen card, live or quoted, to keep its ground.
`test_a_picked_options_muted_words_stay_aa_under_the_pointer` measures a
picked option's § reference under hover in both forms and both schemes
(3.98:1 and 4.15:1 before, passing after). The new stills state
`ship-option-reference-hovered` shows the hovered pick:

| hovered pick | before | after |
|---|---|---|
| light |
![](https://github.com/user-attachments/assets/db5d85d8-9b7a-49d2-9107-cd68dcbb9b34)
|
![](https://github.com/user-attachments/assets/c1e6b0b2-1691-4c1e-8b82-fb2caa8b8155)
|
| dark |
![](https://github.com/user-attachments/assets/7caa01ee-ab68-4acc-9649-2b96bf1b5fbc)
|
![](https://github.com/user-attachments/assets/735b4e04-15e9-40ca-8b45-b4196ad52072)
|

The alternative kept a response under the pointer by mixing the pick
back toward the card. That reads as a pick fading out, so I didn't take
it; the grey's depth, at rest and under the pointer, is Max's call.

Closes #6452 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants