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.
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.

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.
Honestly, No! Inverting colors using filter isn't a good base to build upon under any circumstances.
When am I to put the lime in the coconut?
😂😩