Skip to content

Commit a382f40

Browse files
pdanpdansaadeghi
andauthored
docs: describe automatic scrollbar gutter detection (saadeghi#4169)
* docs: describe automatic scrollbar gutter detection ref saadeghi#4086 * format --------- Co-authored-by: Pouya Saadeghi <pouya.saadeghi@gmail.com>
1 parent 604b9dd commit a382f40

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/docs/src/routes/(routes)/components/drawer/+page.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ You can check/uncheck the checkbox using JavaScript or by clicking the `label` t
5959

6060
> :INFO:
6161
>
62-
> Opening a drawer adds a [scrollbar-gutter](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) to the page to avoid layout shift on operating systems that have a fixed scrollbar.
62+
> Opening a drawer adds a [scrollbar-gutter](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) to the page to avoid layout shift on operating systems that have a fixed scrollbar.
63+
> On recent Chromium based browsers vertical scrollbar presence is detected automatically. On Safari and on mobile devices the scrollbar is displayed as overlay so there will not be gutter. On Firefox you need to detect the presence of vertical scrollbar and set the `scrollbar-gutter: stable` or `scrollbar-gutter: unset` on `:root` element yourself.
6364
> If you don't want to use this feature, [you can exclude `rootscrollgutter`](/docs/config/#exclude).
6465
6566
### ~Drawer sidebar

packages/docs/src/routes/(routes)/components/modal/+page.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ classnames:
5454

5555
> :INFO:
5656
>
57-
> Opening a modal adds a [scrollbar-gutter](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) to the page to avoid layout shift on operating systems that have a fixed scrollbar.
57+
> Opening a modal adds a [scrollbar-gutter](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) to the page to avoid layout shift on operating systems that have a fixed scrollbar.
58+
> On recent Chromium based browsers vertical scrollbar presence is detected automatically. On Safari and on mobile devices the scrollbar is displayed as overlay so there will not be gutter. On Firefox you need to detect the presence of vertical scrollbar and set the `scrollbar-gutter: stable` or `scrollbar-gutter: unset` on `:root` element yourself.
5859
> If you don't want to use this feature, [you can exclude `rootscrollgutter`](/docs/config/#exclude).
5960
6061
## Method 1. HTML dialog element `recommended`

0 commit comments

Comments
 (0)