Please please please don’t impose dark mode on your websites. Honor the user’s system settings.

There are plenty of people with visual impairments as common as astigmatism who can’t read light text on dark background, because it’s like staring at a strong lightbulb in the dark.

And it’s not hard. Just a few lines of CSS.

#accessibility

Yes, I can *somtimes* use reader mode, but 1/ I shouldn’t have to, and 2/ that means all the trouble you went to to design your site was for nothing wasn’t it?

#accessibility

@sknob

Ah mais tellement !

Je suis astigmate et ça me flingue la vue.

D’ailleurs, sur mes sites et RS favoris, j’ai souvent une surcouche CSS même en clair pour limiter les contrastes trop durs (Genre, noir-noir sur fond blanc-blanc, c’est pas terrible) et les typo pas assez grasses.

@sknob

I wonder if anyone has managed to make a #Faircamp site that respects browser choice.. or at least allows switching. Mine is more on the dark side I guess, but I think my Hyper 8 site switches depending on user preference and it definitely has a switcher top right.

@keefmarshall I’m pretty sure I added that to the #faircamp wishlist, and ironically, my faircamp site is on the darker side, but there’s not a lot of text, and it isn’t super high contrast…
@keefmarshall @sknob What's faircamp like for pluggable themes and the like?
@sknob Ideally following system settings and having a little toggle somewhere for light/dark etc. I like having the option to change my mind 😁

@eaterofsnacks if the site doesn’t switch automatically but has a switch, I’d say that’s acceptable :)

(But it’s so easy to implement the automated switching. Adding a toggle is more complicated)

@sknob @eaterofsnacks

Presets have become barriers in themselves.

I have an individualized set of colour filters. All the presets are impossible for me. And I am not unique.

When I need to look at locked pdfs or other things that won’t adapt, I use a filter or ColorVeil, as second best, depending on the device. Neither works at all on a dark mode base.

In any case, having a toggle for my colour set as well as for the filter/veil is already two steps to accessibility.

Saying that adding a toggle is more effort to implement honestly is exasperating to someone who has to make adjustments to adaptations work constantly.

@sknob and please support dark mode, i hardly can read on white background

@sknob 👍
A few month ago, I noticed I had hard times reading code on my screen, its was blurry. And I stumble upon someone saying it can happen if you have astigmatism or other troubles.

I've read a bit about that, and I switched all my tools, terminal, IDE, database GUI etc on light themes, just to give a try.
It felt a bit strange strange the first days but I read really better.

I will no longer fall into the Dark Side.

@sknob I prefer dark mode, but I _absolutely_ think it should be a choice. Makes sense to go with the user's system setting, but could add a toggle in addition for extra points.

@KennyPark @sknob similar views here. I like dark mode by default, but think it should be a choice 🌔

Of late, I've been using an #epaper monitor for work, in which light mode is absolutely necessary to display well not to mention better for monitor lifespan. Starting to use it really drove home the point which was until then more theoretical ☀️

Also, web development wise it *is* fun coming up with smart stylesheet solutions that adapt to the preferred mode, so what's not to like? 😉

@sknob
... or a few less lines of CSS and just leave it to the browser ...
@sknob is that why I hate it??? 🤯🤯
@sknob the problem is that CSS does not distinguish between "no preference" and "prefers light", so if we want dark by default, light can only be a toggle. automatic switching only works for themes that are light by default
@sknob ("yes, and") same goes for light mode. Hurts my eyes and sometimes gives me migraines.

@dngrs @sknob ooh I think I have this too!! I wonder how many people have it as well!

Edit: wait I meant I think dark mode triggers a kind a migraine for me - not light mode. Interesting that it can happen for either!

@elduvelle @sknob sensory stuff is pretty fascinating in general, yeah!

@sknob @media (prefers-color-scheme: dark) {

}
@media (prefers-color-scheme: light) {

}

/* Done */

@sknob CSS custom properties and the prefers-color-scheme media query are your friends!
@erin @sknob This and having an override in the interface settings for people who turn off a lot of media queries to avoid fingerprinting 

@erin @sknob

It's disappointing how few sites respect that knob though. Just as forcing a dark theme is unfortunate, we dark-theme-preferrers have been subjected to light-themes for decades.

@sknob yeppp. i have the accessibility shortcut on my phone set to invert the display because of this. one big block of light is tolerable, bright bands of text are prettttty unbearable

@sknob I’m starting to think that some designers are just assholes.

“Yea let’s do 50% gray on an off-white background with a hairline font! Oh it’s hard for people to read? Tough shit LMAO.”

@DeltaWye @sknob lets ignore all standards of how users expect to navigate a website and give no indication of how we expect them to interact with this page, if a user wont spend 10 minutes guessing how to use it they didn't really want our service anyway.

@sknob

i can't use dark mode

it screws up my vision for an hour

@sknob
That's a weird comparison, considering that the text printed on light bulbs is dark on a very bright background.

@sknob Just a few lines of CSS if you layed out your CSS in the correct way. If not it's a refactoring.

I don't say, don't do it. But sometimes it's much more work than just changing some lines of code.

Especially if your CSS is older than a year.

I made the mistake in one of my projects back then not thinking of light mode (and wasn't aware of the accessibility implications) and now it's a big refactoring. Yes the code is rushed and it's entirely my fault.

But the time needed to fix this properly I was able to add light mode (or dark mode respectively) to 6 other sites.

@sknob I like to set CSS variables in the :root for the light theme colors, and then use a media query for "prefers-color-scheme: dark" to change the variables to dark theme colors. Pretty easy to implement and tweak.

Having a theme switcher is also valid, but I feel like websites should just respect the user's preference automatically. Of course you can do both.

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

Using CSS custom properties (variables) - CSS | MDN

Custom properties (sometimes referred to as CSS variables or cascading variables) are entities defined by CSS authors that represent specific values to be reused throughout a document. They are set using the @property at-rule or by custom property syntax (e.g., --primary-color: blue;). Custom properties are accessed using the CSS var() function (e.g., color: var(--primary-color);).

MDN Web Docs
@sknob pro tip:

you can even completely save yourself from making a light/dark theme entirely by not setting any custom colors and just using
:root { color-scheme: light dark; }


(or dark light if you want to show dark when there's no preference)

and ta-da, you're now using the browser defaults for light and dark, which should be accessible by default :3
@alexia @sknob no preference doesn't exist anymore as far as I know, browser vendors decided to only implement light and dark and do light as the default and the standard was updated to reflect that
@lunareclipse @sknob @alexia wait they don't? istg this was still a thing, unless it's changed recently?
prefers-color-scheme - CSS | MDN

The prefers-color-scheme CSS media feature is used to detect if a user has requested light or dark color themes. A user indicates their preference through an operating system setting (e.g., light or dark mode) or a user agent setting.

MDN Web Docs
@solonovamax @sknob @alexia even if the UI has an option for no preference, browsers always send a preference to websites, that setting just means "whatever the OS suggests or light"
@sknob yes, good to know, will make changes accordingly. Sorry, was ignorant about this.
@sknob
Why can't websites and apps have a light bulb at the top, in that agreed to place, left, middle, other left, and you press/click it and it goes dark, again, it goes light and i can do my hommer
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
Light goes on
Light goes off
@sknob I agree with this sentiment wholeheartedly. Light or dark, you should be honouring the users system settings. There are many reasons people go 1 way or the other so just respect it. It’s not that hard
@sknob If at hand, could people please give me some links describing this ?
@sknob ... who'll tell that wikipedia...
Additionally, if you're someone that has said visual impairments (or simply doesn't like the look of dark themes), the Dark Reader extension has a light mode;
@sknob did not know astigmatism / similar could cause this (i have a hard time reading light on dark during the daytime)

As some with astigmatism (alongside other things), I don't really know where you get that…

I can only read text if they are white on black/dark. I can't even understand/make up what words i'm supposed to be reading no matter which font I use

@sknob @Canageek likewise, do not impose light mode, either! 😖🙈