What is this, 1998? You shouldn't be using JAVASCRIPT to do most of this!

Whilst it is handy to occasionally help CSS with things it's derpy about -- like not being able to transition to/from height:auto -- or for simple SINGLE element triggers like swapping between "fixed" and "static" when scrolling, to get all DIV just for the sole purpose of looping through each and every blasted element hardcoding in a simple style change? /FAIL/ at web development.

You want to set them all to 3rem, do a flipping class swap on the parent!

body.enlarge div { font-size:3em; }


And skip the stupid processing time wasting loop.

Garbage like this is EXACTLY what's wrong with modern scripting fans failing to be able to keep it in their pants, pissing on efficiency, usability, maintainability, sustainability, and just plain common sense from so on-high you'd think the almighty just got back from a kegger.

And more oft than not also proves that the people who view JavaScript as the solution to every problem don't know enough about HTML or CSS to be flapping their yap on the topic.

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store