Skip to content

Rank markup's reading face below the rest of its layer, so the native control default weighs nothing - #4805

Merged
max-sixty merged 3 commits into
mainfrom
list-ui-fixes
Oct 31, 2026
Merged

max-sixty merged 3 commits into
mainfrom
list-ui-fixes

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Markup's reading face (reading.css) now stands in a cascade layer of its own, lf-reading-face, the first sublayer of the tier its sheet composes into: lf-base in the document and lf-shadow in a declared tree. Every component, package and theme rule of the tier outranks it whatever its weight. So the native control default no longer needs a class's weight to beat the face's element rules, and the fonts check loses its one named exemption.

What changes

  • The native control default weighs nothing (surfaces.css): one weightless rule naming --font-ui, beside a weightless rule for the face classes' ink, which stays separate so a page's own bare <button> keeps the browser's ink as before. tests/model/test_interface_fonts.py drops CONTROL_DEFAULT and its skip, and test_interact_layer.py reads the two rules.
  • The frame reset joins the face's layer, so the face's own frames (a quotation, a disclosure, a cell) still outrank * { --lf-block-frame: 0 }. Left above them, it stopped a disclosure trimming its last child's margin.
  • Workarounds the layer settles are gone: the face's key rules no longer exclude .lf-key-badge, whose own rule outranks them; inline code drops display, contain and isolation, which answered a source renderer's reset that Keep draft and sent Markdown consistent across thread surfaces #1599 already scoped to its source blocks; three of About's declarations that restated the face exactly go.
  • lf-call-diff's location link states its own hover underline colour, which the face's heavier a:hover used to supply.
  • package-themes.md tells theme authors their rules outrank the face at any weight.

Chromium 156 and Firefox 157 both rank a weightless rule of the tier over a (0,1,1) face rule, in the document and in a shadow root.

The dialogs keep the reading face

The session's Leaf page asked whether Leaf's dialogs should stop wearing the reading face. Measured by turning it off for the chrome (threads and Markdown keep it) over 34 dialog, panel and thread states, and by dropping each About, command reference and Page Map declaration in turn: About takes its terms' weight, inline code chips, list spacing, the disclosure's padding and the copyable text's ground from the face, and would need about nine rules to restate them, while the command reference and Page Map take nothing visible. A reset deletes no rule, since the browser's own heading and paragraph defaults need the same restatements, so the chrome keeps the face.

Checks

  • leaf-dev stills on 28 states against main after Give the agent and Leaf one face each for every word about the work, and name the fonts --font-* #4804 (About light and dark, the command reference, Page Map, page search, On me, the leaf's menu, the plan panel, threads and replies, tasks, diff, walkthrough and native code, playground controls, gallery and theme, a phone table, a scrolled Markdown preview): no face appears on one side only, and the one computed difference in every state is the panel's Send, whose line height goes from 20.3px to 21px. Send's own rule (font: inherit, floating-panel.css) now outranks the default as its comment intends, where the class-weighted default used to override its leading; Send is an icon centred in a box of fixed height, so it draws the same pixels. About differs by more than antialiasing only in its fingerprint, runtime ids and port. An earlier run over all 302 states found the same single difference.
  • tests/model/test_interact_layer.py and tests/model/test_interface_fonts.py pass on the branch merged with main.

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

… control default weighs nothing

The reading face's element rules (reading.css) now stand in a cascade layer of their
own, `lf-reading-face`, the first sublayer of `lf-base` in the document and of
`lf-shadow` in a declared tree. Every component, package and theme rule of the tier
outranks them whatever its weight; the page's own sheet and the later tiers outrank
the whole tier as before. Chromium 156 and Firefox 157 both rank a weightless rule of
the tier over a (0,1,1) face rule, in the document and in a shadow root.

What that changes:

- The native control default (surfaces.css) no longer needs a class's weight to beat
  the face: it is one weightless rule naming `--voice-ui`, beside a weightless rule
  for the face classes' ink, and the voices test drops its CONTROL_DEFAULT exemption.
  A component rule naming one of these properties now wins over the default at any
  weight, so the floating panel's `font: inherit` for its `.lf-fp-face` controls gives
  Send the panel's line height (20.3px to 21px on an icon button; nothing moves).
- The frame reset (`* { --lf-block-frame: 0 }`) joins the face's layer, so the face's
  own frames, a quotation, a disclosure and a cell, still outrank it. Left above them,
  it stopped a disclosure trimming its last child's margin.
- The face's key rules no longer exclude `.lf-key-badge`, whose own rule now outranks
  them, and its inline code drops `display`, `contain` and `isolation`, which answered
  a source renderer's reset that no longer reaches code wearing the face.
- lf-call-diff's location link states its own hover underline, which the face's
  heavier `a:hover` used to supply.
- package-themes.md tells theme authors their rules outrank the face at any weight.

Leaf's chrome keeps wearing the face. Resetting it on the chrome and `.lf-ui` (34
stills states) shows what it supplies: About's dt weight, inline code chips, dd, dl,
p, list and disclosure spacing and its copyable text's ground, where the browser's
defaults would indent each dd 40px and set code in bare monospace; the panel title's
tracking; the media viewer link's underline; an On me picture's ring. Keeping About's
design without the face takes about nine more rules, and none of its own
restatements go away, since the browser's h2, h3 and p margins need them as much as
the face's do. The command reference and Page Map take nothing visible from it.

About drops three restatements that changed no computed style: its summary's cursor
and its copyable text's corner radius, which the face supplies, and a pre rule that
the copyable text's own rule repeats.
leaf-agent
leaf-agent previously approved these changes Oct 31, 2026
# Conflicts:
#	browser/runtime/chrome.css
#	browser/styles/components/reading.css
#	tests/model/test_interface_fonts.py

@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 selected test_a_row_at_a_frame_edge_holds_the_trim_by_declaring_it check fails on deliberate-flex on both this head and current main (c3ed4bb65bdef60a49eb751a99e982390fb451da). The same assertion failed in main’s CI run 41156218565, covered by #3985; this inherited failure does not withhold approval.

@max-sixty
max-sixty merged commit f313792 into main Oct 31, 2026
4 checks passed
@max-sixty
max-sixty deleted the list-ui-fixes branch October 31, 2026 03:51
max-sixty added a commit that referenced this pull request Oct 31, 2026
… state fails (#4807)

Fifteen `leaf-dev stills` catalogue states failed to capture on every
run, base and head alike, so no stills comparison covered them, and
nothing said so: the command printed a `failed` line per state and
exited 0. They surfaced while comparing a cascade change across the full
catalogue (#4805).

### The command now fails when a state does

`leaf-dev stills` writes its whole report as before, `faces.txt`
included, then exits 1 if any state failed. Its module header states the
rule, and `test_stills.py`'s failed-driver and failed-analysis tests
expect it.

### Thirteen drivers followed a UI that has since moved

- **plan-option-picked, plan-option-card-picked:** an admitted pick is
announced as "Chose “…”" since #4325, without the "— sent" the driver
waited for.
- **share-link, share-link-dark:** since #4291 a refused copy of the
page's link opens About this page, where the link is read-only text,
rather than a field under the menu's About group. The driver waits for
the dialog's source reading, as page-about does, and the state frames
the dialog's Page details.
- **diff-filter, diff-filter-phone-dark:** #4323 dropped the file filter
from a one-file diff, which `#pr-key-hunk` is; the states filter the
walkthrough's 46-file `#pr-exact-patch`.
- **worktree-summaries (three variants):** since #4724 `lf-worktree`
slots its authored evidence into a shadow disclosure, and the evidence's
own `<details>` also matched the driver's selector. It presses the
widget's `.lf-worktree-summary`.
- **plan-capture (four variants):** area capture opens with no rectangle
until a drag draws one (#3814); `capture_menu` waits for the Capture
area region, as the suite's `open_capture_area` does.

### The contents map has a page again

#4724 moved the feature gallery's contents out of its sidebar into the
reading flow, where it is a folded "On this page" disclosure, so no
example drew the margin map: contents-over-reading failed, and
contents-spine and four more states captured the disclosure instead.
`tests/fixtures/pages/sidebar-contents.html` is a runbook laid out as
the site's docs pages are (`.layout-sidebar` with the contents in `aside
> .layout-track` beside a `.layout-column`), and all eight contents
states read it. As a fixture page it also joins the corpus, which had no
page drawing the map. The gallery's sentence about the map's rings goes,
since its folded disclosure draws none.

### Checks

- The 13 repaired states, the eight contents states and topic-contents
captured on two consecutive runs; each new capture was read by eye (the
filter at "0 of 46", the capture area mid-drag, the closed worktree row,
the picked option, the focused link, the map at rest and revealed over
the column).
- `dev/tests/model/test_stills.py` passes, and fails with the new exit
removed. The fixture passes `leaf page check --render` with no findings.

The gallery's topic-contents sample still says its Full view draws the
map, which it doesn't since #4724; that is left for its own change.

> _This was written by Claude Code on behalf of max-sixty_
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