Re: [csswg-drafts] [css-scrollbars] What do (semi) transparent colors mean for scrollbar-color (#9853)

Here's a tentative summary of where we stand, based on the last call:

While not directly the topic of this issue, there was a proposal made that might help with it, at least in part: that if a thumb color is provided, it applies no only to the thumb, but also to any control other than the thumb that might appear on the track, such as scroll-up or scroll-down buttons.

(regardless of the rest, I'm in favor of adopting this part)

As for the main question of this issue, I think the options being considered are:

**1a.** specify that both thumb and track do respect transparency, without precomposition, (and so the track shows through the thumb and the background shows through the track); also special-case a fully transparent thumb and track to make the entire scrollbar invisible, even if it includes parts that are not otherwise colored (shading, texture, highlights, additional controls besides the thumb…)

**1b.** specify that both thumb and track do respect transparency, without precomposition; also that their alpha channel is also applied to the non-colored parts of the scrollbar. I think this is equivalent to saying that thumb and track are first colored ignoring the alpha channel, then the alpha channel of the thumb/track color is applied to the whole thumb/track, including both colored and non colored parts.

**2a.** Address scrollbar opacity through a separate `scrollbar-opacity` property; the alpha channel in `scrollbar-color` is ignored.

**2b.** Address scrollbar opacity through a separate `scrollbar-opacity` property; the alpha channel in `scrollbar-color` is precomposed (presumably over the named [`canvas`](https://drafts.csswg.org/css-color-4/#valdef-color-canvas) color, although we didn't spend much time discussing which color to precompose against).

We also discussed a "don't specify" option, but consider if off the table, because (at least) I would object to that: we cannot task authors with ensuring good contrast if they cannot know whether `transparent` will mean invisible (non-precomposed), black (ignore alpha), white (precompose against white)…


Personally, I'm in favor of 2b.



-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9853#issuecomment-2010201062 using your GitHub account


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

Received on Wednesday, 20 March 2024 17:40:09 UTC