🤔 Is CSS getting too complicated?


View this email in your browser (or share it with a friend!)

Hello Reader,

Whenever I mention new CSS features on my channel, there are always comments from people complaining that the last thing we need is more CSS features.

They argue that CSS is already complicated enough and that adding more to an imperfect language doesn’t help—it just complicates things further.

I get where they’re coming from, but I think this view misses some important issues.

The Reality of CSS as an Evolving Language

Before talking about some of those issues, I think it’s important to accept that CSS is an imperfect language.

The CSS working group even has a list of mistakes that have been made in the design of CSS.

But the thing is, the existing features can’t be fundamentally changed.

Take the :empty pseudo-class, for example.

The spec was updated to work even if there was a space within the element, but no browsers have implemented it, and there’s ongoing discussion about whether we need a new pseudo-element instead.

It’s similar to how we got :user-valid and :user-invalid to fix issues with :valid and :invalid. Now we might see the same thing with :empty.

Why?

Because changing how :empty works could break older sites that use it according to its current limitations.

On the flip side, some new features don’t change existing behaviour but add new functionality.

A good example of this is, align-content and justify-items now work on block-level elements (browser support isn't fantastic yet).

This addition doesn’t break anything because you wouldn't use these (outside of having made a mistake) on a block-level element in the past.

However, while margin: auto will center things on both axes in a lot of contexts these days, they won’t uadd that for block-level elements because a lot of people have used margin: auto knowing it will center horizontally but not vertically.

This leads to why, often, instead of “fixing” what we have, we end up with new features to accomplish those things we want.

On top of that, we’re also opening up new possibilities with a lot of the new features that we’re getting, like container queries, :has(), and scroll-driven animations, to name a few things that are pretty awesome.

I think for a lot of people, the problem is they already struggle with CSS, and as CSS gains more features, it becomes more complex and harder to master.

But is that such a bad thing?

Because the new features are added on top of what's already there, it leads to my favourite part of CSS, which is that its basics remain the same.

You can still follow a 10-year-old CSS tutorial and learn the fundamentals, which you probably can't say for a 6-month-old JS framework tutorial (I'm looking at you, NextJS).

The language isn’t harder to learn at its core—it simply has more advanced features you can grow into.

I’m hoping this explosion of new features and functionality leads to CSS being treated more as a specialty. We might see more roles where CSS is the top priority, with CSS engineers working alongside JavaScript engineers.

And that can also help with the “I can’t keep up with everything!” reality that a lot of people live in.

If you can focus on one thing, that makes it much easier!

Though, of course, I realize that isn’t the reality for most people.

We live in a world where we’re expected to be able to do it all, but while it does mean there is more to learn, it means that when you search for an answer, you have a better chance of having a real solution instead of a strange hack.

I find it silly to complain that a language is becoming more powerful when the new features are solving real problems.

We’re not just adding features for fun—we’re enabling developers to do things that weren’t possible before or to do them in much simpler ways.

Yes, CSS is becoming more complex.

But it’s also becoming more capable.

And for those who love CSS, that’s an exciting prospect 😊.

🙋‍♂️ What I’ve been up to this week

I was up to more than usual this week!

MPA View Transitions deep dive

video preview

Cross-document, or MPA, view transitions are here, and they are amazing! But there is a lot going on with them, and as I was researching them, I kept seeing that it was Bramus who had great content about them… so I asked if he could teach me more about them and he said yes!

Scroll-state queries are on the way! (and a bunch more)

video preview

The Chrome 133 beta release came packed with so many cool features I had to make a video talking about them.

I don’t plan to do regular updates for all the browsers like this, though it did get me thinking about doing a quarterly “CSS roundup” or something like that, where I take a look at all the browsers, looking at the new features that have shipped, and also if anything new has reached baseline support.

Creating a dark theme for a website - replay

video preview

This is the replay from the livestream I did on Friday, where I added a dark theme to HTML & CSS Tip of the Week.

It was a lot of fun doing it live, and I’m planning to do at least one stream a month going forward.

Shorts of the week

🎙️ Podcast

Staying sane when things get busy

show
Staying sane when things get...
May 15 · General Musings with Kev...
16:24
Spotify Logo
 

I recently went through a period that could have led to burnout, but I managed to avoid it, so I thought I'd share how I managed to get through it.

LISTEN ON: APPLE | SPOTIFY | YOUTUBE | RSS

🔗 Other awesome stuff around from the web

🏁

Have a fantastic week!
Kevin


Are you looking to step up your CSS? I've got both free and premium courses to help with that! They cover a range of skill levels too 👇

Beginner friendly (and free)

HTML & CSS for Absolute Beginners

A free course that starts with the absolute basics, and gets to creating some layouts with Flexbox and Grid.

Enroll →

Intermediate

CSS Demystified

For those who've been writing CSS for a little bit now, but want to step up their game and start writing CSS with confidence!

Enroll →

Intermediate (Frontend Masters)

Build a Modern Site from Scratch

Build a fully responsive site using modern CSS features, along with some polished animations.

Enroll → (25% off first month of Frontend Masters if you use this affiliate link)

If you no longer want to get any emails from me, you can unsubscribe or you can edit your preferences if you'd like pick which emails you get from me.
600 1st Ave, Ste 330 PMB 92768, Seattle, WA 98104-2246

Hi! I'm Kevin

Weekly newsletter, where I talk about tangentially-related front-end development topics and share what I've been up to in the last week, plus any cool/fun/interesting/useful links I come across as well.

Read more from Hi! I'm Kevin

View this email in your browser (or share it with a friend!) Hello Reader, A few months ago, I pitted the F1 team websites against each other, and I thought it would be fun to make a landing page for a fictional team that could at least challenge the few teams who’d done a good job with theirs. I was pretty happy with what I’d come up with, but just as I was putting the finishing touches on it, Jason Lengstorf, of Learn with Jason and Leet Heat fame, reached out to let me know about a...

View this email in your browser (or share it with a friend!) Hello Reader, From my experience, there are a few reasons people push back on new things, but the most common one I see revolves around people preferring the old way of doing things. This makes sense, because they are comfortable with what they are used to, rather than the new way, which is different. When something new comes along, that means they have to learn it, which for a lot of people means that it’s slower. The thing is, in...

View this email in your browser (or share it with a friend!) Hello Reader, Last week on my second channel, I asked a question near the end of the video about whether or not people are worried that, thanks to more and more people using AI to write code, there would be less pressure on languages to evolve. That led to a lot of interesting comments, with a bit of a split on people’s opinions. The two main arguments were: AI producing more and more code just builds up the training data on the...