en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Optional dark theme

Open vitaly-zdanevich opened this issue 7 years ago • 15 comments

Many users like it, many users need it because of sensitive eyes, bad displays, low light conditions. This is called accessibility.

Also, MDN is white only - so dark theme will be your competitive adventure :)

vitaly-zdanevich avatar Dec 18 '17 10:12 vitaly-zdanevich

Would be funny to have it, what you think, @Bezart ?

iliakan avatar Dec 20 '17 15:12 iliakan

What about starting with enabling users to toggle the code example blocks between light (default?) and dark? I like the code blocks and a dark option might be an easy ehnancement.

The next potential feature is allowing the viewer to select a theme option from a few of the most common themes used for code presentation.

nick-walt avatar Dec 26 '17 04:12 nick-walt

@vitaly-zdanevich what you think about the extension, good enough? :)

iliakan avatar Dec 26 '17 08:12 iliakan

Native is always better :)

vitaly-zdanevich avatar Dec 26 '17 11:12 vitaly-zdanevich

Maybe this isn't the place for what I have to say (as this discussion is getting old) but I'll say it anyway, just in case.

@vitaly-zdanevich Thanks for sharing this extension but imo Stylus is a little bit more interesting in our case. It allow users to use custom CSS on webpages.

If we're going for the accessibility debate, I think dark theme is just one of the elements we should consider, text-size, contrast and many more can come in handy for people with bad eye-sight (like me) or let's say color-blind people (like a friend of mine).

spacewasabi avatar May 30 '18 15:05 spacewasabi

I think dark theme will give this website a popularity boost because many new learners like me are using this site daily and we want it to be in dark which is easy on eyes in night.

vivekvpatil8888 avatar Aug 28 '18 07:08 vivekvpatil8888

No doubt, adding dark theme will be great option for night-readers.

originalmk avatar Dec 30 '18 14:12 originalmk

@iliakan I was thinking about creating a dark theme for tutorial pages only, however illustrations might look weird on dark background. Another point is inline examples that have separate css. To cover these 2 parts will require a lot of manual work. Of course we can leave theme as they are, but it will look ugly. What are your thoughts on this?

Bezart avatar Dec 30 '18 22:12 Bezart

What are your thoughts about this, guys?

@Bezart asks about pictures, here are some of them (made in Sketch editor, Mac only, figures.sketch in the tutorial repo):

image

iliakan avatar Dec 30 '18 22:12 iliakan

Hi people! I came here in order to create an issue and start reading this and thought it was an awesome idea. Is still dark mode a thing to develop? I also think as @SugoiNelson that could be just 'the tip of the iceberg' but could be an amazing place to start with.

maurodibert avatar Jun 13 '19 10:06 maurodibert

I'm skeptical about it:

  1. The current light theme is looking decent.
  2. The dark theme actually isn't that good for your eyes.
  3. It's hard to make polished dark theme. Honestly speaking a lot of dark themes out there are just crigny, if someone considering of making it at some point you're better put in the work. It's easy to ruin the platform by introducing a sloppy dark theme.

dagolinuxoid avatar Oct 17 '19 19:10 dagolinuxoid

In the meanwhile was introduced https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

vitaly-zdanevich avatar Oct 17 '19 22:10 vitaly-zdanevich

I use an extension that gives me great control over brightness, contrast and more. it is called "dark reader". it is a great alternative to even native themes. Screenshot_2020-01-14 Class basic syntax

Ali-Hussein-dev avatar Jan 14 '20 00:01 Ali-Hussein-dev

*** careful while using the flags settings on the browser, this can have serious consequences if not done carefully *** if you are using a chromium-based browser you can try the following workaround.

go to the flags using the applicable link

chrome: `chrome://flags/#enable-force-dark`
brave:`brave://flags/#enable-force-dark`
edge:`edge://flags/#enable-force-dark`
  1. change the flag from default to enabled
  2. relaunch the browser

this will turn every site accessed on the browser to dark mode. I would suggest having a secondary browser for this.

sanket-bhalerao avatar May 03 '21 16:05 sanket-bhalerao