Add manual darkmode to docs #2483
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, I was procastinating and noticed that pillows docs have a dark mode that's activated when your browser does the
prefers-color-schemethingy. My eyes like dark mode, so I had a look at how they did that.Apparently the RTD theme won't have a native dark mode for a while (readthedocs/sphinx_rtd_theme#224 is open since 2015, so ~as old as PTB). So they just took the https://darkreader.org Chromium-Extension and exported the CSS generated by that. Looks neat IMHO. Can be previewed at https://python-telegram-bot.readthedocs.io/en/docs-dark-mode/. If you don't find the dark-mode setting in your browser, here are some screenshots:
Click to expand
Alternative approaches would be to go with different sphinx templates like Furo, but I actually like the RTD theme and this manual approach isn't maintenance-heavy.
Obviously this is anything but pressing, but still nice-to-have IMO. If you like it, we can merge, if not I won't be too sad 🙂