fix(ui): use native platform scrollbars instead of custom ::-webkit-scrollbar rules - #230
fix(ui): use native platform scrollbars instead of custom ::-webkit-scrollbar rules#230bsneed wants to merge 1 commit into
Conversation
|
Thanks for contributing to Atomic Chat, and for tracking this one down with One thing needs to change before we can merge, plus a question and an optional 1. Our theme is an independent user setting ( Could you bind it to the class instead? :root {
color-scheme: light;
}
:root.dark {
color-scheme: dark;
}Note it has to be 2. A question about the mechanism. Since Safari 18.2, setting Which macOS / WebKit version did you test on? If the trigger really is 3. Optional: keep a fallback for older engines.
Minor: the six-line comment reads as a changelog of the change; a line or two on |
1ebabaa to
05508f1
Compare
|
Thanks for the review @Vect0rM, good catches. 1. 2. The mechanism: 3. Fallback: I've amended my commit. Lemme know what you think, thanks so much! |
|
Thanks for the turnaround, @bsneed — points 1 and 3 are both in, and the rewritten comment now explains why I built and inspected the output rather than eyeballing the CSS, since there's still no CI on this branch:
That's the good news. One thing I'd like changed, and the question from last round has become more load-bearing rather than less. 1. The fallback is gated on the wrong feature
So on any WebKit that lacks
Either way the condition should be the one that actually matters: @supports not (scrollbar-width: thin) {
/* ...old rules... */
}That targets engines which can't do the standards path at all, and it can never re-enable the pseudo-elements on WebKit ≥ 18.2. Same fallback intent, no chance of undoing the fix. 2. The A/B test, again — and what the title promisesLast round you offered to test the two edits separately and then amended a single commit, so we still don't have that data point. It matters more now, because of something in your own answer: if the pseudo-elements were already inert on 18.x and If that's right, this change fixes the colour but not the persistence, while the title and description promise native overlay behaviour is restored. Your "after" screenshot can't settle it — a still frame can't show auto-hide. Could you run it on the 15.7.3 box:
and say whether the bars auto-hide in each? If they don't auto-hide in (b), the honest fix probably involves dropping Worth saying plainly: neither of us can see this. I'm on macOS 26.5.2 / Safari 26.5.2, where 3. Two small ones
Change 1 is what I'd like before merging; 2 is a question I need answered rather than a diff; 3 is optional. None of it is a knock on the direction — fighting the platform for scrollbar styling was the wrong trade, and you're the one who noticed. Thanks for staying with this through a second round. 🖱️ |




Describe Your Changes
On macOS in dark mode, scrollbars render as bright white bars that are permanently visible. This happens because the custom
::-webkit-scrollbarpseudo-element rules opt out of native overlay scrollbar behavior. Once any::-webkit-scrollbarstyle is defined, macOS stops using its native overlay scrollbars and switches to a permanently visible custom-rendered track.This PR removes the
::-webkit-scrollbarrules and addscolor-scheme: light darkto:root, which tells the native scrollbar to follow the OS light/dark theme automatically. The standards-basedscrollbar-width: thinandscrollbar-colorproperties are preserved. These hint at thinner scrollbars with appropriate colors without interfering with native behavior on any platform.The old
/* Firefox scrollbar */comment was removed because those properties (scrollbar-width,scrollbar-color) are standards-based CSS, not Firefox-specific. The properties themselves are unchanged.What changed:
::-webkit-scrollbar,::-webkit-scrollbar-track, and::-webkit-scrollbar-thumbrules (these disable native scrollbar behavior)color-scheme: light darkon:root(enables theme-aware native scrollbars)scrollbar-width: thinandscrollbar-color(standards-based, no side effects)Tested on:
Screenshots below.
Fixes Issues
Self Checklist