Skip to content

Commit 0dc6c22

Browse files
roed314claude
andcommitted
Don't make the outer table knowl box a horizontal scroll container
Review of PR #20 pointed out that the added `overflow-x: auto` on `td > .knowl-output` turns the box into a scroll container, which exposes the scrollable overflow of the absolutely positioned `.knowl-footer` (`width: 100%` starting after the parent's 10px left padding, plus its own 10px left padding). Measured in the browser, that is 20px of scroll range on every table knowl, so even a short knowl whose content fits gained a horizontal scrollbar (box height 123px -> 138px). The declaration was also redundant: `.knowl-content` already has `max-width: 100%; overflow: auto` and is the right inner scroller for over-wide content. Drop `overflow-x` (so the box keeps the inherited `overflow: hidden`) and reword the comment accordingly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 30fd86d commit 0dc6c22

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lmfdb/templates/style.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,11 +1178,10 @@ table .knowl a {
11781178
knowl_click_handler in lmfdb.js). Inline-size containment keeps that row
11791179
from being counted when the browser computes the column widths, so opening
11801180
a knowl no longer pushes the other columns around (issue #6501): the box
1181-
simply spans the table's current width. Content that is still too wide
1182-
scrolls horizontally inside the box instead of stretching the table. */
1181+
simply spans the table's current width. The .knowl-content overflow rule
1182+
above handles content that is wider than the available box. */
11831183
td > .knowl-output {
11841184
contain: inline-size;
1185-
overflow-x: auto;
11861185
}
11871186
.knowl-output.loading {
11881187
color: {{color.grey}};

0 commit comments

Comments
 (0)