My favorite new CSS feature


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

Hello Reader,

It’s hard to pick one thing because there is so much to pick from right now, but I think my favorite new CSS feature is anchor positioning.

Check out this navigation that I’ve put together for a project I’m working on, where the underline and link highlight is all from a single pseudo-element.

video preview

That’s all done with something like 20 lines of CSS!

And, with a handful more, I created a decent fallback for browsers that don’t support it yet, that while not as fancy, I think it does a good enough job as a fallback.

video preview

If you’re curious on how I did it, I don’t have a breakdown of this one (yet), but it’s quite similar to what I looked at in this video a little while ago, with the big difference being a couple of delays in the transitions.

video preview

And it’s only getting better from here, with Chrome having recently shipped the ability to detect which fallback you are using (if you are using them), so you can make further adjustments, which is great for things like tooltips.

There’s a lot of other great things that are coming as well, but I think anchor positioning is going to be a bit like :has(), gaining a lot of usage quite quickly as it’s support increases, because it’s easy to use (though it definitely has it’s quirks!) and is useful for so many different things.

📺 3 Powerful nesting tricks

video preview

Following up from last week’s video where I looked at the basics of nesting, this week I take a look at what we can do when we get a little more creative with how it works.

⚡ Simplified modifier classes with this CSS trick

video preview

A quick look at how we can use attribute selectors for modifier classes. This has the potential to clash with other classes, so you do need to be careful with it 🙂.

🎙️ 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 from around the web

📝 Quiz time!

You have a decorative element that is a child of a .card, and you want it to sit on the card’s outer border edge so it can be moved anywhere around the perimeter. Which of these would align it on the border, assuming the element has position: absolute, and the .card has position: relative?

  1. position-area: border-box;
  2. offset-path: border-box;
  3. offset-shape: border-box;
  4. shape-outside: border-box;

As per usual, you'll have to head on over to YouTube to take a stab at the quiz, and once you answer, you'll see if you were right or not.

🏁

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, I’ve started collecting answers for a Family Feud style game called Asked 100 Devs (more on this at the very end of the email), and one of the questions I asked was “What is your favorite color format in CSS?” I don’t want to spoil the results yet (I’ll be having some contestants on soon to try and guess the top answers to the questions), but something that caught me by surprise was that, of the answers for rgb, 80% of...

View this email in your browser (or share it with a friend!) Hello Reader, Trying something a little different this week with some quick hits before we dive into the main content. The 2026 edition of the State of Dev’s survey is now open. As with all of the State of surveys (or well, any survery for that matter), the more people who take it, the more representative it is. As I let you know earlier this week, I’ll be speaking at ZurichJS in September. If you are in the area and can’t make it,...

Hello Reader, An off-schedule email this week, as I completely forgot to send my regular newsletter on Sunday, and I had wanted to share something that's time-sensitive. I've mentioned this a few times now, but I'll be speaking at Zurich JS Conf on September 11th (along with others like Scott Tolinski, Daniel Roe, Tajas Kumar, and many others), and the ticket price is going up in 3 days. I'll be having some fun talking about how we can now use CSS for a lot of things we'd traditionally used...