this post was submitted on 29 Aug 2025
57 points (100.0% liked)

Web Development

4513 readers
73 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

An overview of what makes modern CSS so awesome.

you are viewing a single comment's thread
view the rest of the comments
[–] Ephera@lemmy.ml 9 points 1 day ago
:root {
  color-scheme: light dark;
  --text: light-dark(#000, #FFF);
  --bg: light-dark(#EEE, #242936);
}

Hmm, I guess the advantage of that over

@media (prefers-color-scheme: dark) {
    /*set different values for variables*/
}

is that you can set the color scheme via a button much more easily then.

Had to think about that for a moment, because the old way of doing things seemed fine, but that is a pretty good reason, I guess.