Skip to content

Commit fddcfa7

Browse files
authored
Merge pull request w3c#3065 from upsuper/scrollbar-color
[css-scrollbar] Merge scrollbar color properties into one
2 parents 71966ce + 60d2305 commit fddcfa7

File tree

1 file changed

+22
-25
lines changed

1 file changed

+22
-25
lines changed

css-scrollbars-1/Overview.bs

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,58 +50,56 @@ Values</h3>
5050
also accept the <a>CSS-wide keywords</a> keywords as their property value.
5151
For readability they have not been repeated explicitly.
5252

53-
<h2 id="scrollbar-color-properties">
54-
Scrollbar Colors: the 'scrollbar-face-color' and 'scrollbar-track-color' properties</h2>
53+
<h2 id="scrollbar-color">Scrollbar Colors: the 'scrollbar-color' property</h2>
5554

5655
<pre class="propdef">
57-
Name: scrollbar-face-color,
58-
scrollbar-track-color
59-
Value: auto | <<color>>
56+
Name: scrollbar-color
57+
Value: auto | <<color>>{2}
6058
Initial: auto
6159
Inherited: yes
62-
Computed value: the computed color or the keyword auto
60+
Computed value: two computed colors or the keyword auto
6361
Animation type: <a href="https://www.w3.org/TR/css3-transitions/#animtype-color">color</a>
6462
Applies to: boxes to which 'overflow' applies
6563
Percentages: n/a
6664
</pre>
6765

68-
These properties allow the author to set colors for various aspects of an elements scrollbars.
66+
This property allows the author to set colors of an element's scrollbars.
6967

70-
UAs must apply the scrollbar-* values set on the root element to the viewport.
68+
UAs must apply the scrollbar-color value set on the root element to the viewport.
7169

7270
Note: Unlike 'overflow' (and overflow-*) properties,
73-
scrollbar-* values set on the HTML body element are not propagated to the viewport.
71+
scrollbar-color value set on the HTML body element are not propagated to the viewport.
7472

75-
<dl dfn-type="value" dfn-for="scrollbar-face-color">
73+
<dl dfn-type="value" dfn-for="scrollbar-color">
7674
<dt><dfn>auto</dfn></dt>
77-
<dd>default platform rendering for that portion of the scrollbar, in the absence of any other
78-
related scrollbar color properties.
79-
See details below for which scrollbar color are related to which.
80-
</dd>
75+
<dd>default platform rendering for the scrollbar.</dd>
8176
<dt><dfn><<color>></dfn></dt>
82-
<dd>apply the color to that portion of the scrollbar, and potentially other portions of the scrollbar.
77+
<dd>
78+
apply the first color to the thumb of the scrollbar,
79+
and the second color to the track of the scrollbar.
8380
</dd>
8481
</dl>
8582

8683
Details:
8784

88-
If scrollbar-track-color computes to auto, and scrollbar-face-color is not auto,
89-
it is used to color the scrollbar track.
85+
Track refers to the background of the scrollbar,
86+
which is generally fixed regardless of the scrolling position.
9087

91-
If an element has both horizontal and vertical scrollbars, and the scrollbar-face-color is not auto,
92-
use it for the area in the corner between the two scrollbars.
88+
Thumb refers to the moving part of the scrollbar,
89+
which usually floats on top of the track.
9390

94-
If the color of any part of the scrollbar is specified,
95-
implementations may render a simpler scrollbar than the default platform UI rendering, and color it accordingly.
91+
If this property computes to value other than ''auto'',
92+
implementations may render a simpler scrollbar than the default platform UI rendering,
93+
and color it accordingly.
9694

9795
(Note: add diagram showing the different named pieces - something like
9896
<a href="http://www.howtocreate.co.uk/tutorials/scrlbar.html">http://www.howtocreate.co.uk/tutorials/scrlbar.html</a>)
9997

10098
(Note: add example of an overflow element with colorized scrollbars to match page styling,
10199
PNG of the same in a browser that supports it currently)
102100

103-
Implementations may ignore any scrollbar color properties for scrollbar parts that do not exist
104-
on the underlying platform.
101+
Implementations may ignore any of the colors
102+
if the corresponding part do not exist on the underlying platform.
105103

106104
Note: when a user interacts with a scrollbar (e.g. hovering or activating),
107105
implementations may alter which scrollbar colors apply to which scrollbar parts.
@@ -117,8 +115,7 @@ See related <a href="https://github.com/w3c/csswg-drafts/issues/1956">Issue 1956
117115

118116
<pre><code class="css">
119117
<!-- -->html {
120-
<!-- --> scrollbar-face-color: ThreeDFace;
121-
<!-- --> scrollbar-track-color: Scrollbar;
118+
<!-- --> scrollbar-color: ThreeDFace Scrollbar;
122119
<!-- -->}</code></pre>
123120
</div>
124121

0 commit comments

Comments
 (0)