nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Can't disable dark mode

Open EnbyMonkey opened this issue 11 months ago • 2 comments

Describe the bug I set dark-mode but then some of the text became invisible, so I tried to unset dark mode but I couldn't. Specifically, toggling dark mode doesn't seem to work.

Precise recipe to reproduce the issue Was on github.com (private repo) and did Ctrl+space then 'dark-mode' then enter, which turned on dark mode (as expected). However, only some of the text changed to white, the rest of it stayed black. So then I did Ctrl+space and 'dark-mode' and enter but nothing happened. I tried also doing 'toggle-modes' and selecting 'dark-mode' from the list (tried selecting using arrow keys and with mouse) but checked 'toggle-modes' showed that 'dark-mode' was still active.

For website-specific issues: Can you reproduce this issue with Epiphany / GNOME Web (https://wiki.gnome.org/Apps/Web)? On this website, it looks like text is visible but still not possible to disable dark mode once enabled.

Information

  • OS name+version: Ubuntu 24.04
  • Graphics card and driver: TigerLake-LP GT2 [Iris Xe Graphics] [8086:9A49] (driver=i915)
  • Desktop environment / Window manager name+version: Ubuntu 24.04
  • Installation method (Flatpak, Guix, package manager, build from source): Flatpak
  • Output of nyxt --system-information: Command 'nyxt' not found

Output when started from a shell Not sure how to start from shell

EnbyMonkey avatar Jan 19 '25 17:01 EnbyMonkey

Output of nyxt --system-information: Command 'nyxt' not found

With flatpak you need flatpak run engineer.atlas.Nyxt --system-information to get the system informations. This is basically the same as the Nyxt command "show-system-information".

I can reproduce the behaviour also on Gentoo with Nyxt 3.12.0 and with a locally compiled version from the current master branch.

Steps to reproduce

  1. Open Nyxt
  2. Navigate to a website, e.g. https://gigamonkeys.com/book/practical-a-simple-database
  3. Enable dark-mode
  4. Try to disable dark-mode

Expected result

The dark-mode is disabled on the website.

Actual result

The website remains darkened. The status line is correctly showing the "Dark mode {en,dis}abled" messages.

Workaround

Reloading the website resets the colours if dark-mode is disabled.

apt-ghetto avatar Jan 19 '25 18:01 apt-ghetto

This is documented:

(define-mode dark-mode (style-mode)
  "A `style-mode' for styling documents with a dark background.
Unlike other modes, to effectively disable `dark-mode' you must also reload the
buffer."
  ((visible-in-status-p nil)
   (css-cache-directory (make-instance 'css-cache-directory
                                       :base-path #p"style-mode-css-cache/"))))

Can it be fixed? I don't know and it's not a priority right now.

aadcg avatar Jan 19 '25 20:01 aadcg