21
submitted 3 weeks ago by cm0002@lemmy.cafe to c/webdev@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] Kissaki@programming.dev 5 points 3 weeks ago

Waaaait - I recently implemented a simple dark mode for a simple page and thought color-scheme declares intent/support not influence how it is being rendered. I thought I still had to define dark coloring.

I just checked and to my surprise the browser indeed serves different default/root coloring when dark color scheme is declared [as well]. :O This means I can simplify my CSS.

I must have been misled when skimming by "specifies compatibility" and "Component authors must use the prefers-color-scheme media feature to support the color schemes on the rest of the elements." missing the browser behavior change description.

this post was submitted on 20 Mar 2025
21 points (92.0% liked)

Web Development

3835 readers
3 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