Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable dark mode #3575

Open
EnbyMonkey opened this issue Jan 19, 2025 · 2 comments
Open

Can't disable dark mode #3575

EnbyMonkey opened this issue Jan 19, 2025 · 2 comments

Comments

@EnbyMonkey
Copy link

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

@apt-ghetto
Copy link

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.

@aadcg
Copy link
Member

aadcg commented Jan 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants