Too Long; Didn't Read
Putting CSS in Javascript is pretty much the norm these days - but what if we could do the opposite?
Recently, I've been reading quite a bit about Houdini, which gives developers the ability to directly interact with the CSS Object Model.
One of the coolest things about it, is that it lets us put Javascript in our CSS.
In the example below, I've created a background effect where the Javascript is inside the CSS. Every time you refresh, the background is randomized. Check the CSS tab below to see Javascript inside the CSS.
You can even use CSS variables directly in your Javascript code, letting you use standard colors and other settings you configured in your stylesheet.