Skip to content

Commit 0fb88c2

Browse files
authored
reduce to two properties, -face-color -track-color
Per #1960 (comment) implementation/prototyping experience, reduce number of properties to two: scrollbar-face-color and scrollbar-track-color. Resolves issue #1960
1 parent 22343bc commit 0fb88c2

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

css-scrollbars-1/Overview.bs

+8-32
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,8 @@ Values</h3>
5656
Scrollbar Color Properties</h2>
5757

5858
<pre class="propdef">
59-
Name: scrollbar-3dlight-color,
60-
scrollbar-arrow-color,
61-
scrollbar-base-color,
62-
scrollbar-darkshadow-color,
63-
scrollbar-face-color,
64-
scrollbar-highlight-color,
65-
scrollbar-track-color,
66-
scrollbar-shadow-color
59+
Name: scrollbar-face-color,
60+
scrollbar-track-color
6761
Value: auto | <<color>>
6862
Initial: auto
6963
Inherited: yes
@@ -76,18 +70,12 @@ Media: visual
7670

7771
These properties allow the author to set colors for various aspects of an element’s scrollbars.
7872

79-
Note: Per <a href="https://github.com/w3c/csswg-drafts/issues/1960">Issue 1960</a>,
80-
the list of scrollbar-*-color properties is likely to be reduced to 2-3 (ideally 2),
81-
with current candidates being scrollbar-base-color, scrollbar-face-color, scrollbar-track-color,
82-
per <a href="https://www.w3.org/wiki/Css-scrollbars#Use-cases">research so far</a>,
83-
and preferably only two of those. Additional input, data, suggestions welcome at those links!
84-
8573
UAs must apply the scrollbar-* values set on the root element to the viewport.
8674

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

90-
<dl dfn-type="value" dfn-for="scrollbar-base-color">
78+
<dl dfn-type="value" dfn-for="scrollbar-face-color">
9179
<dt><dfn>auto</dfn>
9280
<dd>default platform rendering for that portion of the scrollbar, in the absence of any other
9381
related scrollbar color properties. See details below for which scrollbar color are related to which.
@@ -97,15 +85,8 @@ related scrollbar color properties. See details below for which scrollbar color
9785

9886
Details:
9987

100-
If scrollbar-track-color computes to auto, and scrollbar-face-color and scrollbar-highlight-color are not auto,
101-
they are combined (e.g. dithered) to color the scrollbar track.
102-
If just one of scrollbar-face-color and scrollbar-highlight-color is not auto, it is used to color the scrollbar track.
103-
104-
If scrollbar-face-color computes to auto and scrollbar-base-color is not auto,
105-
then use its value for scrollbar-face-color.
106-
107-
If scrollbar-3dlight-color computes to auto and scrollbar-base-color is not auto,
108-
then use its value for scrollbar-3dlight-color.
88+
If scrollbar-track-color computes to auto, and scrollbar-face-color is not auto,
89+
it is used to color the scrollbar track.
10990

11091
If an element has both horizontal and vertical scrollbars, and the scrollbar-face-color is not auto,
11192
use it for the area in the corner between the two scrollbars.
@@ -122,26 +103,21 @@ PNG of the same in a browser that supports it currently)
122103
Implementations may ignore any scrollbar color properties for scrollbar parts that do not exist
123104
on the underlying platform.
124105

125-
Note: when a user interacts with a scrollbar (e.g. arrow buttons or scroll thumb if any),
126-
implementations may alter which scrollbar colors apply to which scrollbar parts (e.g. replace 3dlight and darkshadow colors with their shadow color, and highlight and shadow colors with their face color.
106+
Note: when a user interacts with a scrollbar (e.g. hovering or activating),
107+
implementations may alter which scrollbar colors apply to which scrollbar parts.
127108

128109
Note: IE uses named System Colors as defaults for each of the scrollbar color properties.
129110
See related <a href="https://github.com/w3c/csswg-drafts/issues/1956">Issue 1956</a>.
130111

131112
<div class="example">
132113
<p>The following example
133-
(as noted in
114+
(derived from
134115
<a href="https://www.w3.org/Style/Examples/007/scrollbars.en.html">https://www.w3.org/Style/Examples/007/scrollbars.en.html</a>)
135116
resets scrollbar colors in IE.</p>
136117

137118
<pre><code class="css">
138119
<!-- -->html {
139120
<!-- --> scrollbar-face-color: ThreeDFace;
140-
<!-- --> scrollbar-shadow-color: ThreeDDarkShadow;
141-
<!-- --> scrollbar-highlight-color: ThreeDHighlight;
142-
<!-- --> scrollbar-3dlight-color: ThreeDLightShadow;
143-
<!-- --> scrollbar-darkshadow-color: ThreeDDarkShadow;
144121
<!-- --> scrollbar-track-color: Scrollbar;
145-
<!-- --> scrollbar-arrow-color: ButtonText;
146122
<!-- -->}</code></pre>
147123
</div>

0 commit comments

Comments
 (0)