Intent to ship: scrollbar-gutter CSS property

235 views
Skip to first unread message

Ting-Yu Lin 林庭宇

unread,
Dec 15, 2021, 5:34:42 PM12/15/21
to dev-pl...@mozilla.org
The scrollbar-gutter CSS property allows authors to reserve the space for the
scrollbar placed at the inline edges, preventing unwanted layout changes when
the content grows and overflows the scroll container. Note that scrollbar-gutter
only has an effect when the OS uses "classic" scrollbar. The overlay scrollbar
(i.e. macOS default scrollbar style when using the touchpad) doesn't occupy
the space at all.

I intend to turn on the support of scrollbar-gutter by default on Firefox 97.

Bug: 

Standard:

The spec has a nice table summarizing the interaction of "overflow" and
"scrollbar-gutter" properties.

Platform coverage:
All platforms.

Preference:
layout.css.scrollbar-gutter.enabled

DevTools bug:
This feature doesn't require extra work in DevTools.

Other browsers:
Google Chrome shipped scrollbar-gutter in version 94 in September 2021.
https://chromestatus.com/features/5746559209701376

Apple Safari has no sign of the implementation yet.
https://bugs.webkit.org/show_bug.cgi?id=167335

web-platform-tests:
https://wpt.fyi/results/css/css-overflow?label=master&label=experimental&aligned&q=scrollbar-gutter

Additional wpt tests are added in Bug 1715112.

Thanks,
Ting-Yu Lin
Reply all
Reply to author
Forward
0 new messages