Browser Dark Mode

Would be cool if the new browser prefers-color-scheme: dark worked in Ubuntu Budgie, so that you can get sites dark modes.

Never heard of it. How does this work?

Any ideas how this would be implemented?

There’s a new CSS media query that lets the developer write…

@media (prefers-color-scheme: dark)

…and nest inside of there css that would change the sites appearance if the browser detected that the OS was in dark mode, which is now on Windows, MacOS, Android, etc. Being that Linux has had dark mode for much much longer, I’m surprised it doesn’t trigger it in Chrome.

Saw mentions on Arch Linux that you could launch Chrome with --force-dark-mode but that didn’t do anything for me, and isn’t convenient even if it worked.

There’s also a new one for prefers-reduced-motion that Ubuntu doesn’t support as there’s no accessibility flag for it.

Not sure how this feature is actually implemented.

It’s a reasonable request. I would need someone to work out the implementation that could be packaged.

Trying to find any info on how we even indicate to Chrome/Firefox the user has dark mode enabled. Not having much luck.

This would be a useful feature, sure, but @octoxan the only problem is that although we could get it to detect Pocillo-dark or a list of dark themes, if the user uses a custom GTK theme, how will it know if it’s dark or not? An optional flag for other themes would indeed be nice