-
Notifications
You must be signed in to change notification settings - Fork 408
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
Use OS color scheme to init light/dark mode (#2591) #2611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I think you're on the right track! Thanks for deciding to implement this
plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js
Outdated
Show resolved
Hide resolved
plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js
Outdated
Show resolved
Hide resolved
I updated my PR. |
If you want, I don't think we'll object :) But I think it's fine the way it is - navigating to any page would trigger the script in the header, so the new theme should be picked up. We'll probably also have to re-do it anyway if/when Dokka migrates to react routing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although I'm unable to test it properly (running a custom linux theme, so it would mess everything up). @vmishenev if you are able and have the theme toggle, could you please check?
Thanks once again for taking the initiative!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested it via simulation in a debugger. It works if a theme switcher has not been used.
Closes #2591
I tried to implement what mentioned in the issue: