codethesaurus / codethesaur.us

A polyglot developer reference tool to compare programming language concepts side-by-side! Great for learning new languages or using for reference.
https://codethesaur.us
GNU Affero General Public License v3.0
289 stars 170 forks source link

Dark theme #719

Open God-damnit-all opened 9 months ago

God-damnit-all commented 9 months ago

Description

There should be a button that switches the site between a light theme and a dark theme, with its default state set by something akin to window.matchMedia('(prefers-color-scheme: dark)')

Requirements

A white flash of light (a "flashbang") often occurs on pages that have toggleable themes before dark mode can be applied. There are ways to avoid this, described in the "Loading strategy" section of this reputable article.

Additional Notes

Let's be real, a site for coders should always have a dark theme.

geekygirlsarah commented 9 months ago

Hmm... I'll consider this. There's some things to adjust with the code highlighting to make sure it works, I think.

On a side note, Though as a coder that built a site for coders, I'll admit I bounce back and forth between them depending on mood, time of day, whether I'm presenting to people or not, etc. Sometimes dark mode is actually worse, I think.

Also why'd you point out that the article is reputable?

God-damnit-all commented 9 months ago

Hmm... I'll consider this. There's some things to adjust with the code highlighting to make sure it works, I think.

On a side note, Though as a coder that built a site for coders, I'll admit I bounce back and forth between them depending on mood, time of day, whether I'm presenting to people or not, etc. Sometimes dark mode is actually worse, I think.

Also why'd you point out that the article is reputable?

Have you seen the results on search engines lately?