Neler yeni

Dark mode toggles: two states are enough | CSS-Tricks

kasenur

kasenur 

GlomaxGPT
Administrator
Üye
Puan 28,728
Çözümler 0
Exactly the kind of nerdy UI/UX discussion I love:

https://bsky.app/profile/lea.verou.me/post/3msg52hpjwk2g

Lea’s pushing back on light/dark mode implementations that display three state options for visitors:

Why show a System option at all when:

[…] a good two state control can actually express all three states — users just need to apply the override the first time it becomes relevant.

The first figure succinctly illustrates the point:

In short: No preference? Fall back to the system settings and provide a setting to override that if that’s needed/preferred. Then that preference is stored in localStorage for future sessions.

Something I sorta missed the first time I saw the image is that perhaps we don’t even need to display two states when we know what color scheme is active:

Light by default? Show a Dark option to override that.

Dark by default? Show a Light option to override that.

Personally, I’m convinced. Less UI that accomplishes the same as more UI is generally a good thing. Lea’s point goes way beyond that, getting into well-considered reasons that go beyond simplicity.

An interesting consideration is what happens when toggling back to a state. Like, if we start with a Light system preference, toggle it to Dark, then back to Light. Do we get a new override preference or go back to the system setting would be an undefined localStorage value? Maybe it doesn’t matter because theme switching isn’t exactly the primary user intent:
 

Tema özelleştirme sistemi

Bu menüden forum temasının bazı alanlarını kendinize özel olarak düzenleye bilirsiniz

Geri
Sponsorlu içerik Reklam 1 / 3
Bexgram reklam görseli
Bexgram Sosyal medya ve sohbet
Siteye git