markdown guide
 

We will add this feature. Not sure the timeline. Probably not before we open-source, and at that point the resource constraints will have a different look to them.

In order to add the dark theme, we'll first want to re-configure and refactor our SCSS to be reliant on more variables, and change variables like $black to $text-color and $background-color, etc. Or alternately we could make a file that loads at the end with lots of !importants. But that could be messy.

And then we'll need to decide how this is handled at the CDN layer. Should be the easy part, but it's not as simple as putting a variable in the code.

Some reading about that general subject:

fastly.com/blog/best-practices-usi...

fastly.com/blog/using-esi-part-1-s...

🙂

 

Whatever you do, please make it so dev.to remains blazing fast. I love how fast it is. I'd hate to see flashes of white backgrounds when navigating.

I trust you guys on this! 💪

 

Yep, that's why it would be baked in at the CDN layer with varnish cache, basically at the edge cache, the request would be aware of your settings via cookies and serve the page based on that info. Every time you do this, you split the requests and end up with fewer cache hits, but anything that affects all users like this is fine. If it was thousands of individual configurations, it wouldn't work. But shared configurations like this are perfectly suitable for this approach.

It's technically pretty straightforward, but it's definitely not as simple as if we weren't edge-caching like this.

 

One of the things that will happen with a dark theme is that any picture that uses a white background will scream at you. Pictures that use a transparent background, if they are dark, might disappear. In other words, you could run in some content backwards compatibility issues. Something to think about.🤔

 

It's weird but I actually got a bit excited for this possibility :D Would love to see that.

 

I run Stylish dark themes on almost all sites that have the option. My eyes can't handle white backgrounds for a long period of time.

 

I'm not sure that light text in dark background would improve reading experience... there's a reason why Medium and most news outlets use light background :)

 

Because habits? Because it's the web's default?

There's also a reason why most developers use dark backgrounds. And why quite some sites are adding dark themes (e.g. YouTube, Twitter).

It's also much nicer when reading with dim lights in the room.

 

For someone like me who sits in front of 3 monitors for at least 10 hours a day, especially at night, a dark theme is priceless. F.lux does a good job on removing blue colors and therefore relaxing my eyes but its still a huge difference if I have a light or dark background to look at for hours. More and more sites are adding a dark mode these days which makes the ones not having one an annoyance because thats the only window/tab that is bright in an otherwise dark/dimm setup.

 

You're not sure it would improve your reading experience, that doesn't mean someone else's reading experience wouldn't be improved. It would be a choice, no one would be forced to read white text on dark background. Each with their own preference.

 

I use the Stylish plugin in Safari. I tend to like an off-white to light gray with Dark(black text)

Classic DEV Post from May 10

If you could change one thing about learning to code, what would it be?

If you could wave a magic wand and make your biggest challenge when you were lear...

Žane Suhadolnik profile image
Web Development, Programming, Computers, Books, Outdoors, Metal, Games, Random thoughts.

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️