Use these well supported CSS features instead of JavaScript


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

Hello Reader,

The end of the week snuck up on me a little this week, so no ramblings to kick things off this week.

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

📺 Use these CSS features instead of JavaScript

video preview​

A lot of the little bits of JavaScript are added to projects exist because CSS couldn’t do the job at the time (or we didn’t know that CSS could).

Modern CSS can do a lot now, but there are a lot of older features people either forgot about while they waited for support, or just never heard of, so in this video every feature has good browser support, so this isn’t a list of things to try in a year.


We're all fed up

video preview​

More and more people are getting tired of the current state of the industry.


⚡ These two features make styling textareas easier

video preview​

The lh unit to size a textarea by lines of text instead of magic numbers, plus field-sizing: content so it grows as people type. About a minute.

📝 Quiz time!

Your element is set to width: 100vw and it’s causing a horizontal scrollbar on desktop. Why?

  • 100vw includes the width of the page’s scrollbar
  • 100vw is relative to the nearest positioned ancestor, not the viewport
  • 100vw measures the document width, which grows with content
  • 100vw rounds up to the nearest whole pixel

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!) PRE-S: After years of people telling me how amazing an event it is, I’m so thrilled to let you know that I’ll be speaking at Beyond Tellerrand in Düsseldorf in April of 2027. Even though they've just started to announce speakers, tickets look like they are selling fast... just saying 😉 Hello Reader, I wanted to talk about something else this week, but I’ve stuck it in my draft for next week instead, because I think what’s currently...

View this email in your browser (or share it with a friend!) Hello Reader, Monday edition of the newsletter this week, as just got back from ZurichJS last night. It was a wonderful conference in a beautiful city, and it was so nice meeting so many people. A big thank you to everyone who stopped me to say hi! I had batched a bit of content before I left, so below is what I was up to this week and the quiz, but I don’t have any links to share this time around. 🙋♂️ What I’ve been up to this week...

View this email in your browser (or share it with a friend!) Hello Reader, As part of my Asked 100 Devs game that I’m doing, I asked developers which CSS property they have to look up the syntax for most often. The video is in the section below, but one thing that I didn’t think of when putting the question together was that people often look a lot of things up 😅. I probably could have phrased the question better, asking about what they look up the most often, but I think it raised an...