docs: cap reference-page <pre> height so horizontal scrollbar stays in view#202
Open
nv-slang-bot[bot] wants to merge 1 commit into
Open
docs: cap reference-page <pre> height so horizontal scrollbar stays in view#202nv-slang-bot[bot] wants to merge 1 commit into
nv-slang-bot[bot] wants to merge 1 commit into
Conversation
…n view Core-module-reference signature blocks list every overload of a function inside a single <pre>. On dense entries like external/core-module-reference/types/coopmat-04/load-0.html, the <pre> grows to ~5700px tall — multiple viewport heights. The block already has overflow: auto from Furo, but the horizontal scrollbar then sits at the very bottom of the <pre>, well below the fold, so users encountering horizontally-overflowing signatures have no apparent way to scroll them. Cap the <pre> height to 75vh on `body.core-module-reference-page` only. Long overload lists now scroll inside the <pre> with both scrollbars visible in-viewport, instead of stretching the page vertically. Verified live by injecting the rule on the affected page: the same <pre> goes from 5722px tall (scrollbar unreachable) to ~475px tall (both horizontal and vertical scrollbars visible and usable). Fixes shader-slang/slang#11262
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes shader-slang/slang#11262 — Reference doc page is missing a side scroll bar.
Root cause (verified live)
The reference pages render every overload of a function in a single
<pre>block. On dense entries (e.g.linalg::CoopMat<...>.Load, 16+ overloads) that single<pre>:overflow: autoalready (Furo default — works correctly)scrollWidth: 2353px,clientWidth: 736px— content really does overflow horizontallyoffsetHeight: 5722px— the<pre>itself is multiple viewport heights tallBecause the inner horizontal scrollbar sits at the bottom of the 5722px-tall
<pre>, it's well below the fold. A user reading the top of the signature list has no visible scrollbar to grab. This matches @jkwak-work's clarification in the issue thread:Fix
Single CSS rule, scoped to
body.core-module-reference-page:The
<pre>becomes its own scroll viewport at most 75vh tall, so both axes' scrollbars stay in view as the user reads. Long overload lists now scroll inside the<pre>instead of stretching the page vertically. Pages with short<pre>blocks are unaffected (it's a max, not a fixed height).Verification
Injected the same rule into the live page in a real browser (Chromium) before committing. Same
<pre>:<pre>heightScope
Only
body.core-module-reference-pageis affected — the rest of the docs site is untouched. If similar overflow issues exist on tutorials or guides, those should be addressed separately.Test plan
coopmat-04/load-0.html) by injection in a live browser; both scrollbars become reachable.<pre>is naturally < 75vh) are unaffected —max-heightdoesn't shrink content shorter than its limit.