Skip to content

Commit d226ee2

Browse files
committed
Compact option rows without docking the margin rail
Preserve the rail's established layout at 930px and beside the thread panel. When a row-form option group is narrower than 20rem, use the compact spacing token so Linux's wider apparatus remains inside the group.
1 parent 3a2f1e1 commit d226ee2

3 files changed

Lines changed: 16 additions & 17 deletions

File tree

‎skills/leaf/assets/theme.css‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ lf-suggestion:not([data-lf-state]) > :is(lf-old, lf-new) > .lf-quiet {
14171417
panel leaves that last band past body's room and the layout hides the marker. */
14181418
--claim-map: calc(52px + var(--here-ring-room));
14191419
}
1420-
body:not([data-lf-cramped]):has(.lf-margin-item[data-lf-claims-rail]) {
1420+
body:has(.lf-margin-item[data-lf-claims-rail]) {
14211421
--claim-rail: var(--rail, 54px);
14221422
}
14231423
}
@@ -1442,16 +1442,12 @@ lf-suggestion:not([data-lf-state]) > :is(lf-old, lf-new) > .lf-quiet {
14421442
* measured, rather than hanging durable apparatus in accidental leftover space. The
14431443
* claim is monotonic for the page's life: settling an action cannot move the column under
14441444
* the reader. Temporary reaction choices borrow the available RHS and dock the complete
1445-
* item if they do not fit; they do not enlarge this claim. Below the breakpoint, or when
1446-
* a side panel leaves less than the page's strip floor, the whole item docks into flow.
1445+
* item if they do not fit; they do not enlarge this claim. Below the breakpoint the whole
1446+
* item docks into flow.
14471447
*
14481448
* This is a claim rather than the strip itself because a sidenote may claim the same side;
14491449
* body spends the wider claim, not their sum. Presence is the pre-layout condition: asking
1450-
* whether the item docked would feed the reservation decision back into itself. The
1451-
* runtime's cramped mark is different: it is measured from the box after the panel has
1452-
* taken its strip, so it releases this claim before layout and lets the row's ordinary
1453-
* out-of-room reading dock it. Keeping the claim through that state made the claim itself
1454-
* shrink the column until Linux's wider apparatus was clipped inside it. */
1450+
* whether the item docked would feed the reservation decision back into itself. */
14551451
@media screen and (min-width: 900px) {
14561452
/* And the right margin is spoken for where a row hangs in it, so a wide widget level
14571453
with one grows to the left alone. The row hangs 22px off the column and the strip is

‎skills/leaf/packages/default/theme.css‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ lf-chip, .lf-chips span {
159159
* the card's hover turned it, and a status lost its stripe and grew a ring the group's
160160
* own clip cut down to a line above the cell. Declared, a rule states the case it is
161161
* true of and has nothing of the other case to undo. */
162-
lf-options { display: block; margin: 14px 0; --lf-joined: 0; }
162+
lf-options { display: block; margin: 14px 0; --lf-joined: 0;
163+
container-type: inline-size; }
163164
lf-option { display: block; position: relative; }
164165
/* The card dressing is the titled form's, said so rather than painted on every option
165166
* and reset by the row form: a reset is a guard reading state another rule wrote, and
@@ -724,6 +725,16 @@ lf-options:not(:has(> lf-option > strong)) > lf-option {
724725
display: table; width: 100%; box-sizing: border-box;
725726
border-spacing: var(--sp-2) 0;
726727
padding: 5px 0; --lf-frame: 1; }
728+
/* A cramped row still has three cells: its words, the block reference, and the mark.
729+
* Separate-border spacing also puts one gap outside each end, and those two empty gaps
730+
* made the table's minimum 14px wider than its group under Linux's wider apparatus in a
731+
* page narrowed by the thread panel. Keep the ordinary gutter while there is room and
732+
* use the compact spacing token when the group's own box is narrow; the cells retain a
733+
* visible gap without clipping the mark the reader presses. */
734+
@container (max-width: 20rem) {
735+
lf-options:not(:has(> lf-option > strong)) > lf-option {
736+
border-spacing: var(--sp-1) 0; }
737+
}
727738
/* The row's own ground: a corner to round and a wash to say its status in, both of which
728739
* are answers to standing alone. A joined row is a cell that butts its neighbours and
729740
* takes the group's stripe, so it is handed neither rather than having both undone. */

‎tests/test_render_gate.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,9 @@ def test_a_page_hands_its_note_strip_back_when_the_panel_takes_the_room(browser,
14671467
page, errors = open_page(browser, url)
14681468
reading = """() => {
14691469
const note = document.querySelector('aside.sidenote');
1470-
const rail = document.querySelector('[data-lf-claims-rail]');
14711470
const main = document.querySelector('main'), s = getComputedStyle(main);
14721471
return {float: getComputedStyle(note).float,
14731472
cramped: document.body.hasAttribute('data-lf-cramped'),
1474-
railDocked: rail.classList.contains('lf-docked'),
14751473
column: Math.round(main.getBoundingClientRect().width
14761474
- parseFloat(s.paddingLeft) - parseFloat(s.paddingRight))};
14771475
}"""
@@ -1495,18 +1493,12 @@ def test_a_page_hands_its_note_strip_back_when_the_panel_takes_the_room(browser,
14951493
assert cramped["float"] == "none", (
14961494
f"the strip outlived the room for it: {cramped}, {misplaced}"
14971495
)
1498-
assert cramped["railDocked"], (
1499-
f"the action rail kept taking a strip from the cramped page: {cramped}"
1500-
)
15011496
assert misplaced == [], (
15021497
f"content set outside a column the strip had crushed: {misplaced}"
15031498
)
15041499
assert wide["float"] == "right", (
15051500
f"a window wide enough for both moved the notes anyway: {wide}"
15061501
)
1507-
assert not wide["railDocked"], (
1508-
f"a window wide enough for the rail left it in the document flow: {wide}"
1509-
)
15101502
assert errors == []
15111503

15121504

0 commit comments

Comments
 (0)