codethesaur.us icon indicating copy to clipboard operation
codethesaur.us copied to clipboard

Dark theme

Open God-damnit-all opened this issue 1 year ago • 2 comments

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.

God-damnit-all avatar Feb 11 '24 14:02 God-damnit-all

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?

geekygirlsarah avatar Feb 11 '24 15:02 geekygirlsarah

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?

God-damnit-all avatar Feb 11 '24 19:02 God-damnit-all