You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-scrollbars-1/Overview.bs
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -292,6 +292,39 @@ Value Definitions</h3>
292
292
Note: When a user interacts with a scrollbar (e.g. hovering or activating),
293
293
implementations may alter which scrollbar colors apply to which scrollbar parts.
294
294
295
+
If the user agent displays the scrollbar without the [=track=],
296
+
they must ensure reasonable contrast between the [=thumb=] and what is behind it.
297
+
However, if the author set the color of the [=track=] to be fully transparent,
298
+
the user agent may assume that the author has provided for sufficient contrast
299
+
even with an invisible track.
300
+
301
+
Note: This is typically relevant in the case of [=overlay scrollbars=],
302
+
either on platforms where the [=track=] is never displayed,
303
+
or on platforms where it is only displayed
304
+
when the scrollbar is being interacted with
305
+
but not when scrolling with the mouse wheel or the track-pad.
306
+
This does not apply in cases where the entire scrollbar is hidden
307
+
as is often the case with [=overlay scrollbars=]
308
+
while no scroll operation is ongoing
309
+
<em>and</em> when the scrollbar is not being interacted with either.
310
+
311
+
<div class=note>
312
+
Note: The user agent is free to achieve this by any of a variety of means,
313
+
depending on the platform,
314
+
on design choices,
315
+
or on what is practical to implement,
316
+
such as:
317
+
318
+
* Doing nothing if it can determine that contrast is already sufficient
319
+
* Doing nothing if the design and geometry of the thumb ensures that some part of it will always be visible regardless of what is behind it
320
+
* Adding an outline, shadow, or glow around the [=thumb=] to provide contrast (possibly using the [=track=] color as the contrasting color, or possibly using a different shade of the [=thumb=] color)
321
+
* Adding some texture or geometry to the [=thumb=] so that it's color isn't uniform
322
+
* Drawing the [=track=] anyway in cases where not doing so yields insufficient contrast
323
+
* Replacing the [=thumb=] color with the [=track=] color when that provides better contrast
324
+
* Altering the luminosity of the specified [=thumb=] color while preserving its hue
325
+
* Disregarding the specified [=thumb=] color altogether and use automatically determined alternative
0 commit comments