Setting And Persisting Color Scheme Preferences With CSS And A “Touch” Of JavaScript

There are many ways to approach a “Dark Mode” feature that respects a user’s system color scheme preferences and allows for per-site customization. Henry Bley-Vroman walks through a new possibility that leans into cutting-edge CSS, with minimal JavaScript to support persisting the user’s color scheme preference across pages. https://smashingmagazine.com/2024/03/setting-persisting-color-scheme-preferences-css-javascript/

Erstellt 1mo | 25.03.2024, 13:40:27


Melden Sie sich an, um einen Kommentar hinzuzufügen

Andere Beiträge in dieser Gruppe

The End Of The Free Tier

Free-tier pricing is a common marketing strategy. “Free” gets people in the door and allows them to settle in and see how things work. But, as Juan Diego Rodriguez explains, the practice of free *tier

26.04.2024, 15:10:12 | Smashing magazine
Conducting Accessibility Research In An Inaccessible Ecosystem

Conducting UX research that includes participants with a variety of disabilities is vital to building inclusive technology, but most prototypes used for testing are inaccessible. Rather than continuin

25.04.2024, 18:30:21 | Smashing magazine
Using AI For Neurodiversity And Building Inclusive Tools

This article illustrates how AI can be leveraged to build tools that can be inclusive with a little bit of an additional effort. https://smashingmagazine.com/2024/04/ai-neurodiversity-building-inclusi

25.04.2024, 11:40:19 | Smashing magazine
F-Shape Pattern And How Users Read

Scrolling, scanning, skipping: How do users consume content online? Here’s what you need to know about reading behavior and design strategies to prevent harmful scanning patterns. An upcoming part of

23.04.2024, 16:30:18 | Smashing magazine
How To Work With GraphQL In WordPress In 2024

What options do we have for integrating GraphQL with WordPress in 2024? Leonardo Losoviz describes the developments that have taken place in this space over the last three years. https://smashingmagaz

19.04.2024, 17:10:02 | Smashing magazine
Converting Plain Text To Encoded HTML With Vanilla JavaScript

What do you do when you need to convert plain text into formatted HTML? Perhaps you reach for Markdown or manually write in the element tags yourself. Or maybe you have one or two of the dozens of onl

17.04.2024, 14:50:06 | Smashing magazine
How To Monitor And Optimize Google Core Web Vitals

The three Core Web Vitals metrics don’t only tell you how visitors experience your website but also impact your Google search result rankings. In this article, we’ll look at what Core Web Vitals are,

16.04.2024, 11:30:09 | Smashing magazine