re: Poor Man's Dark Mode Using CSS Filter VIEW POST


Hi Rik!
You would to do it more shortener

:not(img) { filter: invert(100%) } 

This selector will match everything(even html and body) except img tag)


Apart from selector performance, which often is negligible, I wonder if filtering every element OR only the top one would result in a noticeable rendering performance. Also, would this not result in multiple elements inverting their parent element filter?

code of conduct - report abuse