Skip to content

A board beside a contents sidebar stands past the page room at mid widths #1845

Closed

Description

@max-sixty

What happens

On a column page whose contents outline sits in an aside.sidebar, a four-column lf-board stands 24px past the room the page has for a wide widget in windows about 816–880px wide, and the page scrolls sideways by 24px. leaf page check --render reports both. With five columns the range widens to about 816–1120px.

The same page without the sidebar renders clean at every width the check tries, 360px to 1920px.

It reproduces on builds 282ec0bd048b, 0ab6d4aa7436 and 99bdbb3483ea.

Expected

The board fits the room left beside the sidebar, or scrolls inside itself there, as it does in a narrow window.

Repro

Run leaf page init on a new directory, write this index.html, and run leaf page check --render on it:

<!doctype html>
<html lang="en">
<head>
  <title>Board beside contents</title>
  <meta name="description" content="A board beside a contents sidebar.">
</head>
<body>
<main class="layout-column">
  <aside class="sidebar" id="contents-sidebar">
    <lf-toc id="contents"></lf-toc>
  </aside>
  <h1>Board beside contents</h1>
  <section id="s1">
    <h2>Board</h2>
    <p>Some text.</p>
    <lf-board id="board">
      <lf-column id="col-a" label="First">
        <lf-card id="card-a"><strong>Card</strong> text.</lf-card>
      </lf-column>
      <lf-column id="col-b" label="Second"></lf-column>
      <lf-column id="col-c" label="Third"></lf-column>
      <lf-column id="col-d" label="Fourth"></lf-column>
    </lf-board>
  </section>
  <section id="s2">
    <h2>After</h2>
    <p>More text.</p>
  </section>
</main>
</body>
</html>

Deleting the aside makes the check pass.

Where it may come from

In layouts.css, a column main's --lf-free-l and --lf-free-r subtract what the sidebar takes in the margin (--lf-taken-l, --lf-taken-r), but --lf-room doesn't, and a wide widget's --lf-reach is capped by --lf-room. Where that cap is the binding limit, the board would claim the sidebar's share too, which matches the 24px overshoot. I haven't confirmed that this is the whole cause.

Seen on leaf 282ec0b, installed 2026-10-05T13:00:41-07:00.

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

Activity

  1. added
    bug
    on Oct 5, 2026
  2. added a commit that references this issue on Oct 5, 2026
    0e002fc
  3. leaf-agent commented on Oct 5, 2026

    @leaf-agent
    Collaborator

    I opened #1846 to make the column layout's wide-widget capacity account for the contents map's margin claim and to cap the board's minimum width to that room. The regression reproduced the 24px overflow at 816px before the fix; it now keeps the page within its gutters and scrolls the board's columns internally. The PR still needs its checks on the revised head before it can land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions