Skip to content

The open contents drawer covers the start of the lecture text between 1024px and 1339px wide #219

Description

@mmcky

Found in the review of the #147 gate (study row F004). It is filed without a parent, because the drawer covers text only after a reader opens it, and nothing on the page is broken at rest.

Problem

Below about 1340px wide, opening the contents drawer lays it over the start of the lecture text. The drawer is 250px wide and fixed to the left edge, and at these widths the article text starts closer to the edge than that.

Measured on 2026-09-11 in Chromium, on the /getting-started page of lecture-python-programming's jb2 preview (theme v2.7.0), comparing the open drawer's right edge with the article's first paragraph:

Viewport width Text starts at Width covered by the open drawer
1024px 112px 138px
1100px 150px 100px
1200px 200px 50px
1279px 240px 11px
1280px 216px 34px (the outline column appears here, so the text moves left again)
1340px 270px 0
1440px 320px 0

The book theme avoids this: while its sidebar is open, it pads the page content at 1024–1339px and at 1340–1499px (_page.scss L41-L49).

Where it happens. .qe-toc is position: fixed at z-index: 20 and slides in with translate (styles/app.css L86-L105, L129-L130). Nothing moves or narrows the content while the drawer is open.

Proposed change

Two options:

  • a) Make room for the drawer. At the widths above, pad or shift the content column while the drawer is open. body:has(.qe-toc:popover-open) can select that state; the toggle icons already use it (L164-L168). This matches the book theme.
  • b) Keep the overlay, but make it a modal drawer: dim the page behind it and close it on a click outside.

Acceptance criteria

  • From 1024px to 1339px wide, with the drawer open, no article text sits under the drawer.
  • The closed state is unchanged at every width, and nothing changes at 1340px and above.
  • A visual or DOM test covers the open drawer at 1024px.

Context

Activity

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

    bugSomething is wrong or broken in a lecture or build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions