Repository navigation
fix: draw gesture brackets on boxes whose rings stand on their edge, and keep muted words AA on a picked option - #6455
Conversation
…eep muted words AA on a picked option A box whose marks stand on its own edge said `--lf-ring-at: 0`. The bracket clip for a gesture's mark (surfaces.css) adds that gap to the band's width in a `calc`, and since both properties are registered with `syntax: "*"` the unitless 0 stays a number, so the polygon was invalid and the trace or aim on such a box drew as a whole ring rather than brackets. #6408 made the joined option group one of these boxes, which is when `test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure` lost its brackets. Every edge declaration, and the `outline-offset: 0` that `test_every_ring_stands_at_a_kind_of_box` holds to the same kinds, now reads `0px`, and that test names `0px` as the edge kind's spelling. #6424's picked-option ground, the card mixed 18% toward the settled colour, left `--lf-muted` words on a picked option (its mark's word, a § reference) at 4.39:1 on the reading theme's light paper, below the 4.5:1 that token promises on every surface the layer paints. The mix is now 15%, which reads about 4.6:1 in light and 5.2:1 in dark and stays deeper than the pointer's wash. The margin status test now expects the trace where the traced box says its marks stand, which on the framed option group is its frame (0), per #6408. Closes #6452
leaf-agent
left a comment
There was a problem hiding this comment.
Respelling Leaf's own sheets fixes Leaf's boxes, but authors still hit the trap. skills/leaf/references/package-themes.md ("Leaf rings every box that holds visible focus") tells package authors to declare 0 for a box that draws its own edge. Since --lf-band-gap is registered syntax: "*", that 0 still reaches the bracket calc as a number, so a package's field or chip draws a whole ring under a trace or an aim. No check reports this. test_every_ring_stands_at_a_kind_of_box reads only Leaf's sheets.
The fix belongs in the owner: register --lf-band-gap in base.css as <length> (initial 0px). A unitless 0 then computes to 0px before any calc reads it, whoever declares it. --lf-ring-at keeps "*" and stays without an initial value, so "none stated" still falls back. I checked this with the margin status test, with the joined option group declaring 0. It fails without the registration and passes with it. I'm pushing that change. The 0px respelling stays as the sheets' single spelling.
…ckets A box that draws its own edge may state `--lf-ring-at: 0`, as package-themes.md tells package authors. Untyped, that 0 reached the brackets' calc as a number, the clip was invalid and the mark drew whole. Registering --lf-band-gap as <length> computes it to 0px for every author, not only Leaf's own sheets. Leaf's sheets keep 0px as their one spelling.
|
@leaf-agent The picked option’s hover wash still misses the muted-text contrast contract. On this head in the light reading theme, the proposed picked ground measures 4.65:1, but applying the selected-hover rule’s 8% ink wash lowers it to 3.98:1.
|
…ds stay AA 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 picked ground that took --lf-muted words, such as a § reference, to 3.98:1 in the light theme and 4.15:1 in dark, below the 4.5:1 tokens.css promises. 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 cursor still answer. Behavior changed: 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. New test covers the picked reference's contrast under hover in both schemes; new stills state ship-option-reference-hovered shows the hovered pick.
|
Done in ffc0349. A pick now keeps its picked ground under the pointer and the keyboard aim, in a live joined cell and in an opened settled group. It already stands deeper than the wash, and its settled ring and the pointer cursor still answer. Unpicked options wash as before.
The other route kept a hover response by mixing the pick back toward the card. That reads as the pick fading, so I didn't take it. |
leaf-agent
left a comment
There was a problem hiding this comment.
The hover change and the --lf-band-gap registration hold up, and I have no findings on this head. I'm leaving it unlanded because Max asked to judge the final grey depth, at rest and under the pointer, using the captures in the description. It can merge once he's settled that.
The pre-commit job on ffc0349 failed only on this line's length.
|
Reopening. When #6475 merged, GitHub closed this PR: #6475's commit message ends with "belongs to #6452 and its open fix #6455", and GitHub reads "fix #6455" as a closing keyword. Nobody decided to close it. It is still #6452's repair, and it still waits for Max's call on the picked grey's depth, as the last review says. |
Two causes made
test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosurefail onmain. 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 inbrowser/styles/components/surfaces.cssadds that gap to the band width inside acalc. Both properties are registered withsyntax: "*", so the unitless0stays 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.cssnow registers--lf-band-gapas<length>(initial0px). A box's0therefore computes to0pxbefore thecalcreads it, and that holds for a package's boxes too, sincepackage-themes.mdtells authors to write0.--lf-ring-atkeeps"*"and no initial value, so a box that states nothing still falls back. Leaf's own edge declarations, and the threeoutline-offset: 0declarationstest_every_ring_stands_at_a_kind_of_boxholds to the same kinds, are respelled0px. That test names it as the kind's one spelling. Positions don't change, because0and0pxplace 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-mutedwords on a picked option at 4.39:1 (axe, on the.lf-ref§ reference).tokens.csspromises 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:Captured with
leaf-dev stills --state ship-option-references(and--scheme dark).plan-option-picked,plan-option-card-pickedandsettled-optionshow 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.pypass, as do the ring, aim, trace, pick and contrast tests intests/browser/controls/test_rings.py,test_render_aim.pyandtest_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 declaring0. It fails without the--lf-band-gapregistration 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_inputnow expects a chosen card, live or quoted, to keep its ground.test_a_picked_options_muted_words_stay_aa_under_the_pointermeasures 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 stateship-option-reference-hoveredshows the hovered pick: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