Discord.py: Dark mode docs (w/ option for light still)

Created on 8 Apr 2019  路  8Comments  路  Source: Rapptz/discord.py

The Problem

The docs burn my eyes due to the light theme used.

The Ideal Solution

A dark theme with a toggle for users that oddly prefer to have a light theme for the docs

The Current Solution

Using some jank stylus themes that are rather broken.

Summary

Dark mode theme for the docs w/ option to use light theme still.

suggestion

Most helpful comment

This seems to be a common request for whatever reason so here are the issues with it as I see it:

  1. Making a dark theme on my end takes considerably more effort than making a dark theme on your end using Stylus since I have to modify CSS spread across 3 different files and hope I can get Sphinx to play nice
  2. Even if you get a decent theme going, Firefox does not allow styling of the scrollbar without resorting to JavaScript which will bloat up the documentation even more. The light scrollbar on dark background will be jarring when you see it in code blocks.
  3. If I were to add a dark theme, which takes time and effort, I would also have to store the preference somewhere using cookies which I also do not like doing and do it via JavaScript to toggle etc.
  4. For a vast majority of the population and in many of the sites all around the world, white background on black text is the preferred solution for actually reading text. It is also an accessibility concern for those who have contrast issues. In similar vain, studies have shown that positive display polarity have several advantages so making dark theme the only option would be a bad idea.

All 8 comments

first world problems

https://discord.js.org/#/docs
They made good docs, with _turn off the lights_ option and other tiny features, check it, I haven't seen better documentation
_P. S. I haven't worked with discord.js_

this is a preference, not an issue. you don't make GitHub issues for your preferences. if that was the case, I'd make issues for functions that I feel should be renamed. this is why this "issue" should be closed.

@tigerism The docs are on this GitHub repo and this is a pretty valid issue to raise as theming is configured through the docs source. Equally, if you had a legitimate issue with the naming convention of some methods within the library, an issue would be the correct way to raise it.

This seems to be a common request for whatever reason so here are the issues with it as I see it:

  1. Making a dark theme on my end takes considerably more effort than making a dark theme on your end using Stylus since I have to modify CSS spread across 3 different files and hope I can get Sphinx to play nice
  2. Even if you get a decent theme going, Firefox does not allow styling of the scrollbar without resorting to JavaScript which will bloat up the documentation even more. The light scrollbar on dark background will be jarring when you see it in code blocks.
  3. If I were to add a dark theme, which takes time and effort, I would also have to store the preference somewhere using cookies which I also do not like doing and do it via JavaScript to toggle etc.
  4. For a vast majority of the population and in many of the sites all around the world, white background on black text is the preferred solution for actually reading text. It is also an accessibility concern for those who have contrast issues. In similar vain, studies have shown that positive display polarity have several advantages so making dark theme the only option would be a bad idea.
  1. I think is just a matter of tinkering a bit. Stylus is easy mode but that shouldn't mean it's not worth the slight amount of effort.
  2. The docs right now are 1.3mb. Adding https://github.com/Grsmto/simplebar (for example) would add a whopping 32kb.
  3. Why is this a bad thing, how else would it happen.
  4. This is indeed just an argument against ONLY dark mode, not against trying to implement a toggle.

I would recommend this, because I don't really have extensions for my browser.

If I were to add a dark theme, which takes time and effort, I would also have to store the preference somewhere using cookies which I also do not like doing and do it via JavaScript to toggle etc.

There's actually a @media query to match against the user's preferred color scheme, however support is quite limited right now.

Even if you get a decent theme going, Firefox does not allow styling of the scrollbar without resorting to JavaScript which will bloat up the documentation even more. The light scrollbar on dark background will be jarring when you see it in code blocks.

Firefox 64+ supports an experimental scrollbar-color property that allows you to style the scrollbar track and thumb.

Was this page helpful?
0 / 5 - 0 ratings