1

I'm using Vivaldi on Linux Mint 21.2 Victoria (Xfce). As I understand it, even though I have a dark theme, my browser can't detect this, so web pages display by default on light mode. I'd like to have web pages display in dark mode using the @media (prefers-color-scheme:dark) query, not some extension or chromium flag that forces web pages into non-native dark mode. Is this possible using Vivaldi's CSS or JS modding capabilities?

I really have no clue where to start here. I'm just a hobbyist looking to modify my own viewing experience, and the other questions I've seen about overriding prefers-color-scheme prefs are from web developers looking to add a toggle or something on their websites.

Edit 2023/08/03

Here's an idea: in DevTools, I can use the Rendering tool and select "Enable automatic dark mode" to do what I'm looking for, which is setting prefers-color-scheme to dark. I can also use the "Emulate CSS media feature prefers-color-scheme" to do effectively the same thing. Is there a way to automate either of these settings to load on every web page? Of course, I'm still open to other solutions, especially those just involve native Vivaldi tinkering without DevTools.

  • It looks like you'd have to use something like tampermonkey (https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo). That will allow you to change the setting you're looking at, rather than a "dark mode" extension – Trevor Newhook Aug 02 '23 at 19:35
  • @TrevorNewhook from what I've seen online I don't know if you can edit the default media query value from JS. Is this true? Also, couldn't I do the same thing with a Vivaldi JS mod? – Smiley Tiger Aug 03 '23 at 01:13
  • Does launching Vivaldi from the command line with `--force-dark-mode` work for you? It does not work for me, but some sources claim it might also work on some Linux distros. – t.niese Aug 03 '23 at 21:33
  • @t.niese unfortunately this doesn't work for me – Smiley Tiger Aug 04 '23 at 23:36

0 Answers0