Skip to content

Commit

Permalink
add scrollbar-width per issue #1958
Browse files Browse the repository at this point in the history
Define a new 'scrollbar-width' property to set the maximum thickness of element scrollbars if any / when shown, per issue #1958.
  • Loading branch information
tantek authored Jul 5, 2018
1 parent 6424851 commit 1b78100
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion css-scrollbars-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ These properties allow the author to set colors for various aspects of an elemen
UAs must apply the scrollbar-* values set on the root element to the viewport.

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

<dl dfn-type="value" dfn-for="scrollbar-face-color">
<dt><dfn>auto</dfn>
Expand Down Expand Up @@ -121,3 +121,34 @@ See related <a href="https://github.com/w3c/csswg-drafts/issues/1956">Issue 1956
<!-- --> scrollbar-track-color: Scrollbar;
<!-- -->}</code></pre>
</div>


<h2 id="scrollbar-width">Scrollbar Thickness: the 'scrollbar-width' property</h2>

<pre class="propdef">
Name: scrollbar-width
Value: auto | <<length>>
Initial: auto
Inherited: no
Computed value: absolute length or the keyword auto.
Animation type: <a href="https://drafts.csswg.org/css3-transitions/#animtype-length">length</a>
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>]
Percentages: n/a
Media: visual
</pre>

This property allows the author to set the maximum thickness of an element’s scrollbars when they are shown.
Negative <<length>> values are not allowed.

When a user agent displays one or more scrollbars for an element,
the thickness of those scrollbars must be no more than the computed 'scrollbar-width' value.

When scrollbar-width is 'auto', implementations must use the default platform scrollbar width.

UAs must apply the scrollbar-width value set on the root element to the viewport.

Note: Unlike 'overflow' (and overflow-*) properties,
a scrollbar-width value set on the HTML body element is not propagated to the viewport.

Note: This specification does not define the exact position or shape of the scrollbar,
or any animation thereof, such as fading or sliding in/out of view.

0 comments on commit 1b78100

Please sign in to comment.