-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add selectable editor themes #31
Conversation
This adds a new 'Theme' dropdown menu to the playground. Themes include: - light (current playground theme) - dark - dark with high contrast On load all themes are registered, and them localStorage is checked for any saved theme, defaulting to 'light'. Updates store the last selected theme in localStorage. Related: microsoft/TypeScript-Website#90
I added a checkmark as an indicator in the dropdown menu. It doesn't look good IMO. Let me know if I should just get rid of it. I was thinking there was something like that in bootstrap 3, but didn't see it. I guess it could be like a dropdown select if you want. Also, seems a little janky on load when you're not using the light theme, but that's probably worse for me right now because I have a pretty high-latency connection right now. Let me know if I should deploy this using gh-pages so you can see it in action without having to check this out. |
TODO: Add the 'crockford' theme. That's black on white with no syntax highlighting, because syntax highlighting is for kindergardeners. 🚎 |
It doesn't blink on reload when you're in dark too now |
Yeah so I had to disable format on save and didn't stage those trailing whitespace changes. Whole thing could use a trip through prettier so my editor doesn't try to rewrite all the files. |
Yeah, I have to have my formatters disabled because of the examples which need custom formatting |
Well, there's already a Anyway, thanks for making this happen, you have increased the happiness in the world. |
This adds a new 'Theme' dropdown menu to the playground. Themes include:
On load all themes are registered, and them localStorage is checked for
any saved theme, defaulting to 'light'. Updates store the last selected
theme in localStorage.
Related: microsoft/TypeScript-Website#90