Totally agree, CSS is insane. It’s mostly because it’s just had stuff bolted on to it over the years instead of re-imagining it for the contemporary situation. Not to mention that the android / browser fragmentation issue is real.
I feel like its at this point where there are so many approaches to the same solution that its just confusing to know where to begin or where to point your compass. It’s not like regular programming where the same tools with different logic gets you to the same result. its more like different tools with different logic gets you to the same place, but all of the different tools are called ‘CSS’
calc() in css has been just the best thing that they’ve introduced. It should be able to compensate for the issues in that article to some degree.
In my classes (I teach this stuff at MCAD ) I’ve totally eliminated so much old css and am now just teaching the following as the beginner core skills:
-
Core: color, font-family/size, borders, padding, margin, width, height, etc.
-
Units: px, vw, vh, em, calc() (a dash of % for more advanced students). An emphasis on flexible units to eliminate the need for a lot of media query resets.
-
Layout: css grids only
-
Positioning: (not teaching it anymore! - instead teaching transforms inside grids)
-
Transforms: translate()
-
Images: background / background-image
-
mobile: Media Queries to manipulate grid columns and rows
-
bonus: Css animations and transitions (so much fun power here!)
With that tool set, you can build about 90% of most things you’d want to. And likely 100% of the indistinguishably designed web that we look at most of the times these days.