I know. Learning CSS is daunting, it is difficult at times, and there are always changes happening and browsers handle things differently than others. It's tough. You can also do it. Here is how I did it and still do.
I am writing this article after seeing a tweet earlier that said (paraphrasing) "Don't like CSS? Learn a CSS framework." That's irresponsible and cause for future problems and issues. Here is why.
I've never known a CSS framework to have every single piece of vanilla CSS in it. You may have to write your own, you may have to ditch it and go with something else. CSS frameworks aren't up-to-date with the latest that I know of.
You're falling behind with some piece of CSS that could work better than a JS fix. You're dealing with a framework that don't or doesn't have a feature in CSS that works in all browsers, such as place-items
, place-content
, or place-self
. Not now anyway.
It causes future accessibility issues. If you know me, you know I am an Accessibility Advocate. What is going on with the web year after year is, we are (designers and developers and persons in-between) ruining the web with muddled code and inaccessible sites and apps.
You're learning how to do it wrong. Not learning CSS first before you dive into a framework is like diving into React without learning the basics (and intermediates) of JavaScript first. You're throwing the baby out with the bath water.
I've been developing both front and back end for over 21 years now and I can assure you, when you learn CSS first, it's daunting and hard, but when it all comes together, it is fun and exciting to learn!
Here is what I tell everyone who asks (or doesn't):
- Ask questions. Ask all the questions.
- Keep learning CSS.
- Ask more questions. No question is a "stupid" question.
- Find people in CSS that are widely-known and ask questions.
- Keep learning and don't let the difficulties get to you.
- Go a step beyond. Learn how browsers work!
- Find me on social media and ask me. If I can't answer it, I'll find someone who can.
Learning a framework works for some. I don't suggest it and have always written every line of CSS for every project I have done, do, and will do. It's fun and it is fun to be able to manipulate pixels and blocks of content in the browser.
It can be fun for you too. Just take the time needed to learn CSS first. I bet you won't regret it.