How to add a specific body class for the dark (or light) mode?

I remember seeing this a long time ago, when I was working more in-depth on my Discourse installations!

Definitely a good workaround. Thank you. I’ll consider that the proper solution, even if it may be considered as a bit hacky.