Skip to content

Commit 1b78100

Browse files
authored
add scrollbar-width per issue #1958
Define a new 'scrollbar-width' property to set the maximum thickness of element scrollbars if any / when shown, per issue #1958.
1 parent 6424851 commit 1b78100

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

css-scrollbars-1/Overview.bs

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ These properties allow the author to set colors for various aspects of an elemen
7373
UAs must apply the scrollbar-* values set on the root element to the viewport.
7474

7575
Note: Unlike 'overflow' (and overflow-*) properties,
76-
scrollbar-* values set on the HTML body element are not propagated to viewport.
76+
scrollbar-* values set on the HTML body element are not propagated to the viewport.
7777

7878
<dl dfn-type="value" dfn-for="scrollbar-face-color">
7979
<dt><dfn>auto</dfn>
@@ -121,3 +121,34 @@ See related <a href="https://github.com/w3c/csswg-drafts/issues/1956">Issue 1956
121121
<!-- --> scrollbar-track-color: Scrollbar;
122122
<!-- -->}</code></pre>
123123
</div>
124+
125+
126+
<h2 id="scrollbar-width">Scrollbar Thickness: the 'scrollbar-width' property</h2>
127+
128+
<pre class="propdef">
129+
Name: scrollbar-width
130+
Value: auto | <<length>>
131+
Initial: auto
132+
Inherited: no
133+
Computed value: absolute length or the keyword auto.
134+
Animation type: <a href="https://drafts.csswg.org/css3-transitions/#animtype-length">length</a>
135+
Applies to: block containers and boxes that establish a formatting context [same as elements that <a href=https://www.w3.org/TR/CSS22/visufx.html#propdef-overflow">'overflow' applies to</a>]
136+
Percentages: n/a
137+
Media: visual
138+
</pre>
139+
140+
This property allows the author to set the maximum thickness of an element’s scrollbars when they are shown.
141+
Negative <<length>> values are not allowed.
142+
143+
When a user agent displays one or more scrollbars for an element,
144+
the thickness of those scrollbars must be no more than the computed 'scrollbar-width' value.
145+
146+
When scrollbar-width is 'auto', implementations must use the default platform scrollbar width.
147+
148+
UAs must apply the scrollbar-width value set on the root element to the viewport.
149+
150+
Note: Unlike 'overflow' (and overflow-*) properties,
151+
a scrollbar-width value set on the HTML body element is not propagated to the viewport.
152+
153+
Note: This specification does not define the exact position or shape of the scrollbar,
154+
or any animation thereof, such as fading or sliding in/out of view.

0 commit comments

Comments
 (0)