Skip to content

Commit c93eddf

Browse files
authored
chore(content): stop the page rail from leaking below 1280px (#1946)
The on-this-page rail rendered at every viewport width instead of only from 1280px up, so below that tier it landed as an extra grid row under the nav column and its sticky positioning painted the table of contents and page actions on top of the sidebar. The rail now disappears below 1280px as intended, leaving the collapsible "On this page" disclosure as the only table of contents there. Introduced by #1902, which added the flex context the coffee card needs but left it unscoped: `aside[data-blume-toc]` outranks the `hidden` utility Blume hides the rail with. ## Fixes - Docs and blog pages between 1024px and 1280px no longer show the rail overlapping the sidebar, and no longer carry the 918px of dead scroll the phantom grid row added. - Mobile and tablet widths no longer append a full-width duplicate table of contents and page-actions block, worth another 755px of dead scroll, to the bottom of every page. ## Testing Checked on `blume dev` at 375, 1023, 1210, 1279, 1280 and 1440px on both a docs page and a blog post. Below 1280px the rail computes to `display: none` with the grid height matching the content column exactly; from 1280px up the three-column grid, the rail's flex column and the coffee card pinned flush to the viewport bottom are unchanged. No console errors, no horizontal overflow at any width. A sweep of the live DOM for other `hidden` utilities losing on specificity found none.
1 parent a5689b9 commit c93eddf

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

apps/content/theme.css

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,22 @@ main#blume-content {
309309
the aside lets the card's `order-1` + `mt-auto` pin it to the bottom of the
310310
rail without owning RootLayout. The card's sticky wrapper owns the bottom
311311
spacing instead of the aside's pb-10, so the card rests at the same offset
312-
whether the rail scrolls (stuck at bottom-0) or not (mt-auto). */
313-
aside[data-blume-toc] {
314-
display: flex;
315-
flex-direction: column;
316-
padding-bottom: 0;
317-
}
312+
whether the rail scrolls (stuck at bottom-0) or not (mt-auto).
318313
319-
aside[data-blume-toc] > * {
320-
flex: none;
314+
Scoped to xl, the tier Blume reveals the rail at: `aside[data-blume-toc]`
315+
outranks the `hidden` utility that hides it below xl, so an unscoped
316+
`display` here would leak the rail onto every narrower viewport as an
317+
extra grid row under the nav column. */
318+
@media (min-width: 80rem) {
319+
aside[data-blume-toc] {
320+
display: flex;
321+
flex-direction: column;
322+
padding-bottom: 0;
323+
}
324+
325+
aside[data-blume-toc] > * {
326+
flex: none;
327+
}
321328
}
322329

323330
/* Blume tints `:::tip` blocks with the accent color, which here is the brand

0 commit comments

Comments
 (0)