Skip to content

Respect user's light/dark mode choice - #4

Open
midnight-wonderer wants to merge 1 commit into
knu:mainfrom
midnight-wonderer:bug/respect-light-mode
Open

Respect user's light/dark mode choice#4
midnight-wonderer wants to merge 1 commit into
knu:mainfrom
midnight-wonderer:bug/respect-light-mode

Conversation

@midnight-wonderer

Copy link
Copy Markdown

There is this static dark class in the html elements.

Normally, this class has to be added by the display application.
However, since the class is in static HTML, the documents are always displayed in dark mode.

Can we respect both choices?

@knu
knu force-pushed the main branch 3 times, most recently from 0b1e79e to ee17121 Compare November 24, 2024 05:59
@xxdavid

xxdavid commented Jun 20, 2025

Copy link
Copy Markdown

On my machine, the generated docs respect light/dark mode system settings (and dark/light mode switcher in Dash). The addition/removal of the dark class should be handled by the common.js script. Are you using Dash or some other viewer?

@xxdavid

xxdavid commented Jun 20, 2025

Copy link
Copy Markdown

Hmm, maybe I was wrong. I am a bit confused by the behavior. Now it seems that switching to dark mode just makes Dash somewhat-intelligently invert colors of a page. The Tailwind dark theme doesn't seem to be used.

@midnight-wonderer

Copy link
Copy Markdown
Author

I am using it on Zeal, BTW. It is Dash compatible.
Sorry for assuming other people see the same thing. On Zeal, on the version before I patch, the docs are all dark.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants