Dark mode in css | Use filter invert

Опубликовано: 25 Октябрь 2024
на канале: Code with Sloba
3,556
132

Dark mode in css? A useful CSS filter is invert, which (no surprise) inverts the colors of everything inside.
Using this filter on black text and a white background simulates dark mode.
Unfortunately, the images and videos look weird, because its colors get inverted with everything else.
The good news is that multiple filters can apply at the same time.
So Applying the same filter to images and other visual content, reverts things back to normal.

CSS shorts:    • Playlist  

More shorts:    • Frontend Shorts  


Linkedin: link   / slobodan-gajic  
Twitter:   / _slobodangajic_  
Portfolio: https://bobangajicsm.github.io/portfo...