Closed cassidyjames closed 4 years ago
The latter has potential breakage, i.e. if there's an installed stylesheet called, foo-dark but not one called foo. In that case it will fall back to Adwaita, which is still probably fine. I believe this is a similar approach WebKit is taking for native input styling.
I think Firefox might do this now too.
Ugh, after spending way too much time poking at this, everything is terrible. I tried to get things to work with option 2 above, and it breaks being able to change the theme on Ubuntu after opening the app. I think I'll just implement the first option and drop the switcher if the OS or user is using ugly dark mode hacks.
Both have been spiked out as PRs #233 (to hackily try to support -dark themes), and #234 (to hide the switch when using -dark themes).
Not sure which I am in favor of. #234 is certainly simpler.
I think WebKit is looking for a
-dark
suffix in addition to a:dark
theme variant, so the web styles are forced to always be dark. I see two options:-dark
(easiest), or-dark
strippedThe latter has potential breakage, i.e. if there's an installed stylesheet called,
foo-dark
but not one calledfoo
. In that case it will fall back to Adwaita, which is still probably fine. I believe this is a similar approach WebKit is taking for native input styling.This directly affects Ubuntu 20.04 with their light/default/dark setting, as well as Pop!_OS (maybe since 19.04 or 19.10?) with their dark mode toggle that forces
pop-dark
.