-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Added dark mode button next to language select #19603
Conversation
Aelof3
commented
Jun 9, 2020
- Added script to the bottom of index.html to update color scheme
- Added style element to head via javascript
- Sends message to iframe viewer to update color scheme on change
- Added button to inputWrapper via javascript
- Added script to the bottom of index.html to update color scheme - Added style element to head via javascript - Sends message to iframe viewer to update color scheme on change - Added button to inputWrapper via javascript
|
Just a heads up the documents loaded in the viewer iframe only accept updates from the threejs.org domain, so it probably will not update the color scheme for whichever document is loaded on that test link |
Thanks for the PR! However, I think I prefer a simple solution and not allow users to change between light and dark mode with a button. Besides, design related PRs are somewhat no longer accepted, see #19375 (comment). |
This seems complicated... |
I think the only complicated bit is passing the message to the chosen doc iframe to update the css there as well |
@Aelof3 What's the use case? You want to force dark mode but your desktop is in light mode? |
The issue I was having was that the linux distro I use doesnt specify my preference to the browser, like windows does, so I just came up with a way to have a switch for it. It isnt a big deal, just thought it might be handy for people that dont have their preferences reflected automatically |
The bug is in the distro then 🤓 I think adding a theme selector to the editor makes sense, but I don't think the docs/examples UI should get more complicated because a linux distro lacks a feature... |
Closing this. Sorry. |