Skip to content

Lay out dl.facts only in the reading theme, so a page without it keeps its own - #5421

Merged
leaf-agent merged 1 commit into
mainfrom
fix/facts-class-reading-theme
Nov 5, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/facts-class-reading-theme

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Core reading.css now lays out only Leaf's own dl.lf-facts; the reading theme's defaults.css gives dl.facts the same layout. A page initialized without a theme keeps the class="facts" layout its author wrote, as @max-sixty decided in #5089.

Since #4889, the core rule dl:is(.facts, .lf-facts) reached every page, so the editorial plain-page fixture's three 244px cards became four 177px grid tracks with their divs shown as contents. .facts is already the reading package's registry idiom, so its layout now lives with it, the way #5288 gave Leaf's own controls lf- names.

What changes on screen: nothing under the reading theme; a page with no theme, or another theme, no longer takes Leaf's facts grid. The worktree details in the diff package's example and an option's .facts rail keep their layout under the reading theme, as before.

Verification:

  • tests/journeys/test_plain_pages.py::test_an_ordinary_page_is_drawn_as_written: editorial failed on main (Editorial definition-list grid overrides authored columns #5089) and passes here. Its class-vocabulary pin and the dl.facts half of that obstacle are removed; form still xfails on the .choice half.
  • leaf-dev stills for page-about, worktree-startup, ship-review, live-progress, alert-review, visual-review-inspection and plan-option-picked: six unchanged. page-about differs only in the About dialog's version text, which reports a dirty tree; its lf-facts lists draw identically.
  • tests/browser/test_render_options.py: 47 pass. Two fail identically on unchanged main (test_a_quoted_widget_exhibits_without_taking_input, test_a_thread_obligations_done_press_keeps_its_keys_and_one_workflow).

Closes #5089

…eps its own

Core `reading.css` laid out every `dl.facts` and `dl.lf-facts` alike (#4889), so a
page initialized without a theme that used the class `facts` for its own layout had
its cards turned into a two-column grid with `div`s shown as contents. The editorial
plain-page fixture drew four 177px tracks where its author wrote three 244px cards
(#5089).

Core now styles only Leaf's own `dl.lf-facts`; the reading theme, which declares the
`.facts` idiom in its registry, gives `dl.facts` the same layout. Under the reading
theme nothing changes on screen; a page with no theme or another theme keeps the
`.facts` its author wrote. The plain-page test drops the `dl.facts` half of the
`class-vocabulary` obstacle and the editorial page's pin, so it now passes rather
than xfails.

Closes #5089
@leaf-agent
leaf-agent merged commit 79914e1 into main Nov 5, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/facts-class-reading-theme branch November 5, 2026 07:15
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.

Editorial definition-list grid overrides authored columns

1 participant