[csswg-drafts] [css-scrollbars-1] How are the specified color used? (#9851)

frivoal has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scrollbars-1] How are the specified color used? ==
The spec is not specific about how the user agent is supposed to use the color provided. Is it required that the thumb / track are painted flat, entirely colored with the specified color and only that one? Is it OK if they merely use the color as input to what the dominant tint of these parts should be, similarly to how [accent color](https://drafts.csswg.org/css-ui-4/#widget-accent) works?

If you look at a variety of operating systems, it has happened sometimes (and notably, that's the case now) that either or both of the thumb and track had a flat single color design, but that is far from the only possible variant.
![jpdGk](https://github.com/w3c/csswg-drafts/assets/113268/af647477-16fb-4dc0-8b04-f84645966e86)



As the specification does not require a particular way the color should be used, I assumed it was fine for user agents to incorporate it in any way they wanted into the coloring of the thumb/track.

However, some tests, like http://wpt.live/css/css-scrollbars/scrollbar-color-012.html and https://wpt.fyi/results/css/css-scrollbars/transparent-on-root.html assume that if you specify a color, you get that color *and nothing else*.

The spec currently allows a simplification of the scrollbar design (though not necessarily all the way down to a single-color flat design) when colors are specified, but it doesn't require it.

> implementations may render a simpler scrollbar than the default platform UI rendering, and color it accordingly.

If that is an expectation we want to depend on, we should add it to the spec. But is it?

Note: On top of that, these tests are a bit of a special case in other ways as well:
* The color they use is transparent, for both the thumb and track, with the intent that the characteristic discussed above will result in an wholly invisible thumb and track. I think this is just trying to use the (assumed) normal coloring rule, but maybe it's meant to be a special case?
* They assume there is no other component to the scrollbar (such as buttons), so that if the thumb and track are invisible, the whole scrollbar is invisible. Although this can be true on some platforms, I don't think that assumption can be depended upon in general. That said, this issue is not about that aspect of the tests.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9851 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 25 January 2024 04:31:33 UTC