Skip to content

Commit 984ea30

Browse files
github-actions[bot]Copilotnojaf
authored
[Repo Assist] Use scrollbar-gutter: stable on scroll containers (#1088)
* Use scrollbar-gutter: stable on scroll containers Add scrollbar-gutter: stable (Baseline 2024) to all vertical-scroll containers to reserve scrollbar gutter space and prevent layout shifts: - main: also adds missing overflow-y: auto so long pages are independently scrollable (html has overflow-y: hidden, so main must be its own scroll container) - #fsdocs-main-menu: sidebar no longer reflows content when the scrollbar appears/disappears - Mobile .menu dropdown: same benefit - dialog ul (search results): prevents width shift when results exceed max-height Closes #1087 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: trigger checks * Bump RELEASE_NOTES: promote Unreleased to 22.0.0-alpha.2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: trigger checks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
1 parent 99d95b2 commit 984ea30

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
## 22.0.0-alpha.2 - 2026-03-13
6+
57
### Added
68
* Search dialog now auto-focuses the search input when opened, clears on close, and can be triggered with `Ctrl+K` / `Cmd+K` in addition to `/`.
79
* Add `dotnet fsdocs convert` command to convert a single `.md`, `.fsx`, or `.ipynb` file to HTML (or another output format) without building a full documentation site. [#811](https://github.com/fsprojects/FSharp.Formatting/issues/811)
@@ -14,6 +16,7 @@
1416
* Generated code tokens no longer use inline `onmouseover`/`onmouseout` event handlers. Tooltips are now triggered via `data-fsdocs-tip` / `data-fsdocs-tip-unique` attributes and a delegated event listener in `fsdocs-tips.js`. The `popover` attribute is also added to API-doc tooltip divs so they use the same top-layer path. [#1061](https://github.com/fsprojects/FSharp.Formatting/pull/1061)
1517
* Changed `range` fields in `MarkdownSpan` and `MarkdownParagraph` DU cases from `MarkdownRange option` to `MarkdownRange`, using `MarkdownRange.zero` as the default/placeholder value instead of `None`.
1618
* When no template is provided (e.g. `fsdocs convert` without `--template`), `fsdocs-tip` tooltip divs are no longer included in the output. Tooltips require JavaScript/CSS from a template to function, so omitting them produces cleaner raw output. [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
19+
* Use [`scrollbar-gutter: stable`](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) (Baseline 2024) on scroll containers (`main`, `#fsdocs-main-menu`, mobile menu, search dialog) to reserve scrollbar space and prevent layout shifts when content changes height. Also adds the missing `overflow-y: auto` to `main` so pages that exceed the viewport height are independently scrollable. [#1087](https://github.com/fsprojects/FSharp.Formatting/issues/1087), [#1088](https://github.com/fsprojects/FSharp.Formatting/pull/1088)
1720

1821
## 22.0.0-alpha.1 - 2026-03-03
1922

docs/content/fsdocs-default.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ header {
239239
list-style: none;
240240
padding: var(--spacing-300);
241241
overflow-y: auto;
242+
scrollbar-gutter: stable;
242243
}
243244

244245
& input:checked + .menu {
@@ -310,6 +311,8 @@ aside {
310311

311312
main {
312313
height: calc(100dvh - var(--header-height));
314+
overflow-y: auto;
315+
scrollbar-gutter: stable;
313316
}
314317

315318
#content {
@@ -469,6 +472,7 @@ main {
469472
grid-row: var(--main-menu-grid-row);
470473
grid-column: var(--main-menu-grid-column);
471474
overflow-y: auto;
475+
scrollbar-gutter: stable;
472476
}
473477

474478
main {
@@ -1269,6 +1273,7 @@ dialog {
12691273

12701274
& ul {
12711275
overflow-y: auto;
1276+
scrollbar-gutter: stable;
12721277
max-height: calc(50vh - var(--spacing-700) - var(--spacing-700));
12731278
list-style: none;
12741279
padding: 0;

0 commit comments

Comments
 (0)