@theleoji
Updated: If you only support exceptionally old versions of browsers, you can write all your JavaScript in your CSS too.
xdesro/1089935159619710979
@theleoji
Alternatively, you can use CSS variables to write your JS and then you only need like one line of actual JS which executes the content of the CSS variable as JS 😎