| Summary: | [iOS] Nested container scrollbars always follow dark theme preference | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sepand Parhami <sparhami> |
| Component: | Scrolling | Assignee: | Nobody <webkit-unassigned> |
| Status: | REOPENED --- | ||
| Severity: | Trivial | CC: | aestes, ldebeasi, simon.fraser, thorton, timothy, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 13 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 13 | ||
|
Description
Sepand Parhami
2020-01-24 14:39:50 PST
I am also running into this issue on macOS Safari. Non-body scrollable containers do not update the scrollbar styling for dark mode. The current behavior is that the scrollbars always appear with a light theme. Steps to Reproduce: 1. Open this CodePen in macOS Safari: https://codepen.io/liamdebeasi/pen/poJYygy 2. Open System Preferences and go to "General". 3. Set "Appearance" to "Light". 4. Set "Show scroll bars" to "Always". A light-themed scrollbar should now be visible on the scrollable div in the CodePen. 5. Set "Appearance" to "Dark" in System Preferences. 6. You should notice that the scrollbar remains light-themed. In this case, I would expect that the scrollbar's styling would become dark themed. Tested on Safari 13.1 on macOS 10.15.4 (In reply to Liam DeBeasi from comment #2) > I am also running into this issue on macOS Safari. Non-body scrollable > containers do not update the scrollbar styling for dark mode. The current > behavior is that the scrollbars always appear with a light theme. > > Steps to Reproduce: > > 1. Open this CodePen in macOS Safari: > https://codepen.io/liamdebeasi/pen/poJYygy > 2. Open System Preferences and go to "General". > 3. Set "Appearance" to "Light". > 4. Set "Show scroll bars" to "Always". A light-themed scrollbar should now > be visible on the scrollable div in the CodePen. > 5. Set "Appearance" to "Dark" in System Preferences. > 6. You should notice that the scrollbar remains light-themed. > > In this case, I would expect that the scrollbar's styling would become dark > themed. > > Tested on Safari 13.1 on macOS 10.15.4 You will want to indicate that you support the dark color scheme: ``` body { color-scheme: light dark; } ``` Thanks! I updated the CodePen. It looks like everything is working properly now. Maybe `color-scheme` is required for this to work properly? Answered my own question: https://webkit.org/blog/8840/dark-mode-support-in-webkit/. Thanks for the help! Is this resolved by using color-scheme: light dark then? (In reply to Timothy Hatcher from comment #6) > Is this resolved by using color-scheme: light dark then? Nope, the original issue (on iOS) of nested scrollbars is not fixed with `color-scheme: light`. The ask is specifically for `color-scheme: light` (either specified, or defaulted) has dark colored nested scrollbars on iOS. This works as expected on MacOS, but not iOS. The `color-scheme: dark` (or `light dark` if you support both) is needed on MacOS to show the light colored scrollbars when in dark mode, which is the expected behavior. |