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

[BUG] flickering when navigating in darkmode #1397

Closed
zilahir opened this issue Nov 1, 2023 · 1 comment
Closed

[BUG] flickering when navigating in darkmode #1397

zilahir opened this issue Nov 1, 2023 · 1 comment
Assignees

Comments

@zilahir
Copy link

zilahir commented Nov 1, 2023

If the docs are generated using: npx @compodoc/compodoc -p tsconfig.json -n 'hello world', when navigating between pages the darkmode is lost for a split of a second, causing a very disturbing white flickering

It's probably related to the dark mote is not beint persisted between page loads. If i have the dark mode on, and navigating, first the toggle goes back to normal mode, and once the page loaded it goes back to dark mode.

Possibly related to this: #1167 , however that is considered as fixed.

os: osx 14.0
node v20.6.1
npm: 9.8.1

There's no any error or warning on the console when generating the docs, and it works well otherwise, apart from the flickering effect when navigating.

@vogloblinsky
Copy link
Contributor

Dark mode is persisted in localstorage. I cannot add an option to persist the dark CSS class in generated pages, because it will be the same for someone who wants the light mode while reading a documentation.
The only enhancement i see is to move the dark mode code in a specific file or even better at the bottom of each generated page.

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

No branches or pull requests

2 participants