Support -webkit-scrollbar styles for webcompat
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Tracking
()
People
(Reporter: wisniewskit, Assigned: denschub)
References
(Blocks 7 open bugs)
Details
(Keywords: webcompat:platform-bug, Whiteboard: [webcompat:p1][webkit-scrollbar])
User Story
Business driver: Top site (and long-tail) interop: Gmail, GCal, Twitch, Youtube
Reporter | ||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 2•8 years ago
|
||
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Updated•7 years ago
|
Comment 4•7 years ago
|
||
![]() |
||
Updated•7 years ago
|
Comment 5•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Assigning per comment 11.
Updated•7 years ago
|
Comment 14•6 years ago
|
||
See bug 1547409. Migrating webcompat priority whiteboard tags to project flags.
Comment 15•6 years ago
|
||
In Bug 1561299, our current plan is to just intervene using scrollbar-width
for important sites. So let's WONTFIX here.
![]() |
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 16•3 years ago
|
||
Sites are still using webkit-scrollbar
, and to my knowledge neither Chrome nor Safari have adopted the scrollbar-width/color variant that's supposed to be the new standard, so we should probably revisit supporting this (at least as a limited alias).
@dholbert, @emilio, what do you think? It doesn't seem like Chrome is taking implementing the new standard very seriously, and even if both they and WebKit do, I don't suspect they will ever deprecate and remove the -webkit-prefix, so we might want to just bite the bullet here and support at least hiding and coloring scrollbars with the -webkit-prefix for webcompat?
Updated•3 years ago
|
Updated•3 years ago
|
Comment 17•3 years ago
|
||
So... We could support some of it, but doing it performantly would be quite a challenge. Scrollbars already create way too many DOM nodes, and we have optimizations to avoid resolving styles for them over and over which this would break. Also, there are tons of ways of hiding these, which would be hard to get right in general. Plus ::-webkit-scrollbar
forces the scrollbar to be overlay, IIRC, so at least implementing something like overflow: overlay
would be a prerequisite. All-in-all it doesn't seem particularly appealing :/
Comment 18•3 years ago
|
||
I don't think anyone is keen to spec the scrollbar pseudo-elements either.
There might be a middle ground. If majority of the issues come from applying display: none
on ::-webkit-scrollbar
to hide the scrollbar, maybe we can parse it and interpret it as scrollbar-width: none
?
Comment 19•3 years ago
•
|
||
FWIW, I think Xidorn's suggestion is a good one. It won't cover all cases, as I just saw a webcompat issue where a site uses 0.5em
width and height, which happens to also end up hiding some scrollbars (perhaps unintentionally).
But I suspect it's the most important case, as not seeing the right color or size of a scrollbar isn't as much of a site usability issue as seeing a superfluous or double scrollbar can be.
Comment 20•3 years ago
|
||
We can also try two other relatively simple things here, as per what I just saw at https://github.com/webcompat/web-bugs/issues/110174:
- Use the background-color value a site sets for
::-webkit-scrollbar-thumb
as thescrollbar-color
. - If a site sets a non-zero value smaller than the normal width of the scrollbar (even roughly guessing), use
scrollbar-width:thin
.
The second of these could help at least keep scrollbars from "covering" content.
Comment 21•3 years ago
|
||
(In reply to Thomas Wisniewski [:twisniewski] from comment #20)
We can also try two other relatively simple things here, as per what I just saw at https://github.com/webcompat/web-bugs/issues/110174:
Part of the issue is that even doing this is non-trivial, performance wise...
Comment 22•3 years ago
|
||
I see, then we might as well just implement them "properly".
Comment 23•3 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #17)
Plus
::-webkit-scrollbar
forces the scrollbar to be overlay, IIRC
No, it doesn't. At least in Chrome, it doesn't force scrollbar to be overlay.
Updated•3 years ago
|
Comment 24•2 years ago
|
||
(In reply to Thomas Wisniewski [:twisniewski] from comment #16)
Sites are still using
webkit-scrollbar
, and to my knowledge neither Chrome nor Safari have adopted the scrollbar-width/color variant that's supposed to be the new standard, so we should probably revisit supporting this (at least as a limited alias).
FWIW "scrollbar-styling" is a focus area in interop-2024, so that's a good sign on the standardized options becoming more usable here.
See https://github.com/web-platform-tests/interop/issues/571 which was the proposal to add scrollbar-width
as part of interop-2024 (accepted).
There was also https://github.com/web-platform-tests/interop/issues/417 for scrollbar-color
which was not accepted, but on the bright side, Chrome shipped it and it sounds like Safari's got an incomplete implementation which isn't yet enabled
Updated•1 year ago
|
Description
•