4 ms·
Because understanding of CSS doesn't helps you in the most cases. Just return to the ages when we needed to support Chrome+Safari+Firefox+IE+custom mobile brow
by nsinreal 3y ago
Because understanding of CSS doesn't helps you in the most cases.
Just return to the ages when we needed to support Chrome+Safari+Firefox+IE+custom mobile browsers (it wasn't long ago). All those engines had so many bugs. Understanding CSS won't help you deal with cross-browser compatibility. This is why we have things like caniuse.com and autoprefixer.
Go a little more back in time. CSS doesn't have a lot of capabilities. Some things can't be achieved at all. Other things can be done quickly via mix of CSS and JS code to update layout; otherwise you need to spend a week to achieve something worse with pure CSS. Even now, we have things like react-motion, react-transition-group - libraries to solve cases that CSS transitions&animations can't solve. (Should we talk about DND?)
In past CSS didn't had Flex-layout widely adopted. This is why there were JS libraries solving layout stuff. We still have libraries that provide list virtualization. Even with the CSS `contain` property (which arrived in 2017 and wasn't widely adopted even in 2021), working with DOM is not cheap.
We didn't have calc() and CSS variables. We still don't have CSS nesting widely adopted. This is why we have LESS & SASS. (Should we talk about CSS modules?)
And ofc, CSS is pretty useless for quick prototyping, you need a UI kit. UI kit means a conceptually different approach than using raw CSS - you don't need to do CSS a lot, but you need to learn UI kit a lot.
Finally, if you are building a product, you deal not only with styling. It's not a landing page, it's not a one week hobbie project -> you need to code a lot. If you are bad at styling, you are bad at ~10% (maybe ~20%) of your work. And considering all the things that we said before, if you are bad at understanding CSS, you are bad at ~1% of your work.
To sum up. You can make beautiful products with little CSS knowledge because CSS alone is useless.