Feb 19, 2024

CSS is Impossible to Master and That's Okay

I have been a web developer for more than a decade, and yet, when it comes to CSS, I always feel a bit out of depth. Not only it’s enormously complex, its complexity is growing every year.

In the year 2023 itself, there were a dozen new additions to CSS: style queries, scroll-driven animations, and trigonometric functions, to name a few.

I hadn’t even completely caught up with the intricacies of Grid Layouting, when subgrid and container queries were shipped. Several of the newly added properties handle cases so specific that I hardly believe I would ever use them (hanging-punctuation and font-palette, for example).

Here’s more: there are at least three properties related to hyphenating paragraphs. You might have used the filter property, but did you know that it supports an entirely different class of filters using SVG? Or that you can tweak the image scaling algorithm? Or border-radius support elliptical corners?

The complexity can be gauged by the fact that there were at least 25 units in CSS. And with container queries, six more were added. Now, imagine being aware of all those units, how to use them, and more importantly, the best time to use them.

There was a time when I wanted to catch up with everything CSS had to offer, but soon enough, I realized the enormity of my ambition—and also, how largely unnecessary it would be.

Not Knowing CSS is Okay

CSS is complex for a reason. Its objective is to provide solutions for a wide range of use-cases—from a simple document to dynamic interactive websites. I might never need to bother with how a paragraph is hyphenated, but for news websites, it could be pretty important.

The trouble stems from feeling the compulsion to know the whole of CSS. Hardcore enthusiasts like Chris Coyier have probably achieved the feat, but the rest of us need to be content with not knowing a large chunk of the language—a desirable constraint, I would argue.

Because, ultimately, CSS is a toolkit. It’s meant to provide tools and solutions for many situations, but not everything is needed at once. You might be proficient with some of the tools, reasonably well with some others, and completely ignorant of the rest. And that’s okay!

If you stumble upon the problem that a CSS feature solves, you will likely learn that feature along the way. And even if you don’t, it’s okay to solve a problem inefficiently, until you stumble upon a better idea in the future. Trust me, you will!

You don’t need to use container queries until you feel the pinch of the problem. You don’t need to know all the funky ways CSS grid can be utilized. You don’t need to feel bad about not knowing how an impressive CSS demo works.

In short, you don’t need to be overwhelmed with CSS. Everyone feels a bit lost when it comes to the language—from juniors to seasoned devs, but this is mostly from the expectation of knowing everything.

CSS is hard and in my experience, best learned by practically experiencing problems and deeply understanding the solutions. It’s good to be vaguely aware of new additions, but you don’t need to start using them right away. Learn them at your own pace; you’ll do fine.

Follow Me!

I write about things that I find interesting. If you're modestly geeky, chances are you'll find them too.

Subscribe to this blog via RSS Feed.

Don't have an RSS reader? Use Blogtrottr to get an email notification when I publish a new post.