I've always read and heard things like:
- "CSS positioning is difficult"
- "CSS works like a black box. It's not clear how it works."
In my humble opinion, that's not the way it is.
CSS is an amazing tool to build not just "web pages", but beautiful user experiences.
My humble advice if you think that way is to study how it works:
Learn the box model and how the HTML elements flow in the layout.
Read about how the properties display, position, width, height, transform, float, and other properties work alone and in combination with other ones.
Read about Flexbox, Grid, and both of them working together.
After that, you are at risk to start loving CSS. And if that doesn't happen, at least you'll be able to understand how to center elements, why an element is positioned in a certain way, or why
"Damned! height: 100%; is not working".
Discussion
It is difficult for some people, 'cause it requires a completely different mindset than imperative programming languages. I'd even go further and say that it requires a different mind, as (HTML + ) CSS relies primarily in linguistic intelligence, while design relies on visual-spatial and programming on logical intelligence.
So it's no wonder that both designers as programmers of imperative languages can find it so out of their comfort zone. Yet the role of a dedicated CSS specialist is usually undervalued, with some companies forcing CSS on their programmers, while other trying to lure them in with a "our designers build the CSS" headline. Both approaches lead to struggle.
I actually agree with you.
This post not actually a blame. And I feel sorry if it sounds like it is.
Is more to encourage people to learn CSS.
I'd say I don't really know CSS, indeed.
Said that you are absolutely right.
Nice post Juan. No need to be humble--taking time to learn how to use the fundamental tools is generally useful in any area (science, technology, cooking). Not sure how CSS could require specialization with MDN covering the basics and as a reference. Browsers don't exactly change overnight so they're manageable targets to track with respect to fundamentals (CSS/HTML/SVG/JavaScript/Web APIs). Most of this knowledge will outlive React, jQuery, IE.
Thanks for your comment. That's the point.
The base doesn't really change.