The Simplest Darkmode<!-- --> | <!-- -->GGAB's blog
php code banner

The Simplest Darkmode

August 13, 2021

In this Friday the 13th, let's get dark. In this article there's a really simple definition of darkmode that I want to try.

The filter css property is new to me, so I'll certainly use it more in the future. But what I did for this implementation was perhaps the most un-react, un-gatsby thing ever: I created the dark class but changed it in the default javascript way, which meant getting the class name that was generated.

I'm sure there's a less hacky and awlful way to do this, but let's say it adds to today's horror theme :).