Skip to content

Mark the open tab by the way its strip runs, for every strip - #3222

Merged
max-sixty merged 2 commits into
mainfrom
agent-a246d17d469ec8509
Oct 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a246d17d469ec8509

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

#3209 gave boxed tab sets the page tabs' underline, but chose that mark by widget: an lf-tabs strip that wasn't a side list got the rule, and every other strip painted a white chip. So a page of parts on a phone, or a parts list placed in a section, drew a row like any tab strip but kept the chip.

What actually decides the mark is which way the strip runs. That fact now has one home, --lf-tabstrip-flow. The strip's flex-direction reads it, and a container style query uses it to pick the mark: along a row, the open name gets the 2px rule; down a column, it gets the outlined face. Each place a strip changes direction (a side list's column and its narrow row, a page of parts' column and its phone row) now sets the token instead of flex-direction, and the lf-tabs-only row rules are deleted. Firefox 151+ supports style queries, and Leaf's shadow trees already depend on them.

The rule's 2px now also comes out of the minimum padding, so a tab is the same height with its rule as without it. Under the old minimum, a queue's row grew 0.3px past the room its strip reserves before upgrade.

What changes on screen: a page of parts' row (on a phone, or placed in a section) and a side list's row (a queue below 36rem) now mark the open item with the rule. Columns keep the face. Page tabs, boxed tabs and both columns are pixel-identical to main in Firefox. In forced colors, a column's open name is underlined, and unopened rules are drawn in the system background colour, in every strip.

Tests: the new test_a_strip_marks_its_open_tab_by_the_way_it_runs checks both marks on a page of parts and on a queue, in both directions, and that the queue's row stays within its reserved height. It fails when the old padding minimum is put back. Also run: the parts switch test, the boxed-tab boundary test, the strip overflow test, the forced-colors page-tab test, the first-paint test, the focus-frame cases and pnpm run check:browser. Probes covered Firefox and Chromium, light and dark, keyboard focus with hover, and a coarse pointer at phone width.

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

max-sixty and others added 2 commits October 19, 2026 19:35
The open tab's mark was chosen by widget: an lf-tabs strip that was not
a side list took the page tabs' 2px rule, and every other strip painted
the open name's face. A page of parts on a phone, or a parts list placed
in a section, is a row like any tab strip, yet kept the white chip,
because the rule named lf-tabs rather than what decides the idiom.

What decides it is which way the strip runs. That fact now has one home,
--lf-tabstrip-flow, which lays the strip out (flex-direction reads it)
and picks the mark through a container style query: along a row the open
name stands on the 2px rule, down a column it paints its outlined face.
Each place a strip turns, a side list's column and its narrow row, a
page of parts' column and its phone row, sets the token instead of
flex-direction, and the lf-tabs-only row rules are gone.

The rule's 2px now comes out of the least padding too, so a tab is as
tall with its rule as without; with the old floor a queue's row grew
0.3px past the room its strip reserves before upgrade.

Behavior change: a side list's row (a queue below 36rem) now marks its
open item with the rule rather than the face, as every row does. Its
column keeps the face. Forced colors underline a column's open name and
hide unopened rules with Canvas, in every strip.

Tests: test_a_strip_marks_its_open_tab_by_the_way_it_runs checks both
marks on a page of parts and a queue in both flows, and that the queue's
row stays within its reservation (fails with the old padding floor).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 0a40314 into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a246d17d469ec8509 branch October 20, 2026 02:51
max-sixty added a commit that referenced this pull request Oct 20, 2026
Two follow-ups to #3222.

**A queue's tab is ruled at its foot.** Along a row, a tab with a
summary put its rule under the name, between the name and its summary
line, so it read as underlining the name alone. Such a tab (a queue's, a
page of parts') now takes the rule at its foot: an `::after` line of its
own under its last line, spanning the tab. The same rules that colour a
name's rule colour it, forced colors included. The name gives up its 2px
to the foot, so the tab keeps its height, and its lines keep to the top
of a stretched tab so the rule sits against the last of them. The open
tab's ink now sits on the tab itself, so the rule and the name share it.

The gap that kept the name's focus ring clear of the diff count is now
the count's own margin. A tab without a count therefore ends at its
words, so the foot rule under a lone name matches the name's rule
exactly, and names in a parts row sit 4px closer together, as page tabs'
do.

**Every row stands on the card.** A row strip's default ground is now
the card. The boxed tabs used to get it through a rule of their own,
which is deleted. Only a queue's column keeps the tinted index, and a
page of parts on the page keeps the page's ground. Before upgrade, every
set's reserved band stands on the card.

**Checks.** Page tabs, boxed tabs and both columns are pixel-identical
to main in Firefox. `test_a_strip_marks_its_open_tab_by_the_way_it_runs`
now reads the foot rule, that it is the tab's last grid line, the row's
ground, and which rules forced colors draw; it fails on main's CSS. Also
run: the parts switch test, the boxed-tab boundary test, the strip
overflow test, the forced-colors page-tab test, the first-paint test,
the focus-frame cases and `pnpm run check:browser`.

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

Co-authored-by: Claude Opus 5.5 (1M context) <[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