<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr" -->

---
title: More Easy Light-Dark Mode Switching: light-dark() is...
description: The CSS `light-dark()` function is being extended beyond colors to support `<image>` values, allowing developers to swap background images, masks, and logos...
canonical: https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: More Easy Light-Dark Mode Switching: light-dark() is about to support images! | daily.dev
og:description: The CSS `light-dark()` function is being extended beyond colors to support `<image>` values, allowing developers to swap background images, masks, and logos...
og:url: https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr
og:image: https://api.daily.dev/og/posts/koAZAFlkr.png
og:image:alt: More Easy Light-Dark Mode Switching: light-dark() is about to support images!
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# More Easy Light-Dark Mode Switching: light-dark() is about to support images!

**[Bram.us](https://daily.dev/sources/bram)** · 4 min read · 42 upvotes · 3 comments

## Summary

The CSS `light-dark()` function is being extended beyond colors to support `<image>` values, allowing developers to swap background images, masks, and logos based on color scheme in a single declaration. This eliminates the need for repetitive `@media (prefers-color-scheme)` blocks and respects local `color-scheme` overrides. Browser support is early: available behind a flag in Chromium 148+, shipping in Firefox 150 (stable April 2026), and not yet supported in Safari. A `@supports` detection snippet using `linear-gradient()` is provided for progressive enhancement. For non-color, non-image values, a 3-line CSS Custom Function workaround is also shown.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.bram.us/2026/03/19/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images/>

## Community discussion

Top comments from developers on daily.dev.

**@yaireo** · 5 upvotes

> I don't understand why shouldn't it just support any value regardless of their type.

**@petecapecod** · 2 upvotes

> Wow this is awesome!! Can't wait to it drops and we can use it.

## Similar posts on daily.dev

- [Dark Mode CSS Variables: Theme Systems with light-dark\(\)](https://daily.dev/posts/dark-mode-css-variables-theme-systems-with-light-dark--jfhy7ptnk) · SitePoint · 70 upvotes · 2 comments
- [Six levels of dark mode](https://daily.dev/posts/six-levels-of-dark-mode-e6um6rawa) · Hacker News · 1 upvotes · 1 comments
- [Modern CSS theming with light-dark\(\), contrast-color\(\), and style queries](https://daily.dev/posts/modern-css-theming-with-light-dark-contrast-color-and-style-queries-xprsuoenj) · Una Kravets · 22 upvotes · 1 comments
- [A few ways of specifying per-theme colours in only CSS — Chris Morgan](https://daily.dev/posts/a-few-ways-of-specifying-per-theme-colours-in-only-css-chris-morgan-yeihwzack) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"More Easy Light-Dark Mode Switching: light-dark() is about to support images!","url":"https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr"},"datePublished":"2026-03-19T11:29:36.574Z","dateModified":"2026-03-19T11:30:13.554Z","description":"The CSS `light-dark()` function is being extended beyond colors to support `\u003cimage\u003e` values, allowing developers to swap background images, masks, and logos...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e23cdd1fc569f7617346f778fd728b65?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e23cdd1fc569f7617346f778fd728b65?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Bram.us","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Bram.us","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/3db2116954be44df873ec24cf0e03d14","url":"https://daily.dev/sources/bram"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":42},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"css","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Bram.us","item":"https://daily.dev/sources/bram"},{"@type":"ListItem","position":3,"name":"More Easy Light-Dark Mode Switching: light-dark() is about to support images!"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/more-easy-light-dark-mode-switching-light-dark-is-about-to-support-images--koazaflkr","comment":[{"@type":"Comment","text":"I don’t understand why shouldn’t it just support any value regardless of their type.","datePublished":"2026-03-20T09:25:36.473Z","url":"https://daily.dev/posts/koAZAFlkr#c-4aTDu5myH","author":{"@type":"Person","name":"Yair Even Or","url":"https://daily.dev/yaireo","image":"https://avatars.githubusercontent.com/u/845031?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"Wow this is awesome!! Can’t wait to it drops and we can use it.","datePublished":"2026-03-27T12:56:15.072Z","url":"https://daily.dev/posts/koAZAFlkr#c-9bzFum5xM","author":{"@type":"Person","name":"Peter Cruckshank","url":"https://daily.dev/petecapecod","image":"https://media.daily.dev/image/upload/s--ZJhQyKws--/f_auto/v1721235024/avatars/avatar_A9xh33q0QoxtkGoJRCosp"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}]}
```

