DEV Community

Discussion on: Go Dark mode with CSS Filter

Collapse
 
astrit profile image
Astrit • Edited

I would not encourage any one to do this specially at this level, on component level maybe.
I get it is a neat simple trick but what is this really doing ?

The idea behind dark-mode is to provide a comfortable experience, even saving* some energy but mostly is for the experience and this method is just a no go.

I would strongly suggest to use CSS variables & prefers-color-scheme in order to achieve dark-mode.

Just imagine some sites who have images and doing this.
Dark mode with filter

Collapse
 
withpyaar profile image
with Pyaar • Edited

The beginning of the post states that it’s a straightforward or quick and single-layered way to achieve dark mode. It’s meant to be built upon.

Collapse
 
ajmalhassan profile image
Ajmal Hassan • Edited

Honestly, No! Inverting colors using filter isn't a good base to build upon under any circumstances.

Thread Thread
 
ionline247 profile image
Matthew Bramer

When am I to put the lime in the coconut?

Thread Thread
 
withpyaar profile image
with Pyaar

😂😩