enable-force-dark does not work
-
cavvs last edited by
How to reproduce the issue:
- Go to opera://flags/#enable-force-dark
- Choose any option to force enable dark pages and relaunch.
- It doesn’t work.
I've attached the screenshots of opera browser, and also of chrome browser to compare.
-
leocg
-
burnout426 Volunteer last edited by
That flag is to control how dark mode behaves when you force dark mode for a page. It's not for enabling dark mode on its own.
For example, goto https://example.com/, click the Easy Setup button and choose "Force dark mode on pages". Then, change the flag to "Enabled simple HSL" for example and restart Opera and see how the example.com page looks.
If a page is in dark mode, you can right-click and disable dark mode for the page, which will add the site to the disabled list at the URL
opera://settings/content/forceDarkMode
.For the flag, the most common option (if someone decides they need it) is the selective inversion of non-image elements so dark mode doesn't turn images white for example.
-
cavvs last edited by
That flag is to control how dark mode behaves when you force dark mode for a page. It's not for enabling dark mode on its own.
This is not the behaviour observed in Chrome (also Edge, I just tested it) for the #enable-force-dark option.
Basically in Chrome or Edge, #enable-force-dark turns ALL WEBPAGES into dark mode regardless of whether they have a dark theme or not.
Have you ever refreshed a website using dark mode and seen short-lived white flashes during when it loads up? That's the browser's default white background showing up while the rest of the web content is loading. And when I use the #enable-force-dark option in Chrome/Edge, that background is flipped to black and I don't get epilepsy when I visit webpages.
-
cavvs last edited by
@cavvs alright so just to make sure, I installed the opera gx browser and it didn't do the force dark thing properly either.
Then I tried installing Brave browser, and it turns out everything works just as expected in it when #enable-force-dark is enabled.
I think someone needs to look at opera's code and get it fixed at some point. I'm not coder, I wish I could help. So I'll leave it in the capable hands of the custodians of opera. Peace.
-
burnout426 Volunteer last edited by
@cavvs said in enable-force-dark does not work:
This is not the behaviour observed in Chrome
I think Opera does its behavior on purpose where it has the additional force dark pages control that the flag depends and only-dark-theme behavior.
Have you ever refreshed a website using dark mode and seen short-lived white flashes
Yeah, most users call these flash bangs. There are lots of situations that these can happen. See https://issues.chromium.org/issues/40581308 for an example in Chrome. They're not always easy to fix. You're also not the only user to complain about them in Opera.