Figma Sites and Your CSS Headscratchers


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

Very quickly, before we get into the topics of this week's newsletter, the State of Devs survey is going to be closing shortly. The survey is for devs, but asks about who we are, rather than what we know. As with all the "State of..." surveys, the more people who take it, the more representative the results are, so if you have a few minutes, it'd be great if you could take the time to take it.

Hello Reader,

So, Figma had a big event this past week, and they released a no-code builder allowing you to go straight from a Figma design to a live site.

As a front-end developer, hearing that might make your heart sink a little.

There have been other tools that can do Figma → Code, but it’s a bit different when it’s a first-party feature.

On top of that, you can ask their new AI feature to add interactivity and animations!

But it quickly became apparent that there are some issues with the sites that it’s creating.

I was going to write a lot more about it, but I ended up talking about it during a live stream, and I cut that part out to make a single video out of it.

video preview

🤔 Your biggest CSS head scratchers

Last week, I asked people what their biggest CSS head scratchers are at the moment, and I was a little surprised by the theme that emerged:

There is some overlap between things (like debugging and scrolling, for example), and I didn’t include every answer because some were very specific.

Also, there was a question about teaching HTML & CSS, and building a curriculum. If you asked that, I’ve got an answer in the section 😊.

Since overflows and unintended scrolling are such an overwhelming theme, the first thing that comes to mind is when people are over-prescriptive with their layouts, or things within their layouts.

I realize that sometimes, there are pretty complex things at play, but a lot of the time, it comes down to either setting or removing constraints which cause these problems.

There are two ways this can cause overflows:

  • If we declare a fixed size on something, it’s more likely to cause an overflow as the space around it is reduced, since it’s still taking up that fixed size. We’re setting a constraint, which then comes back to bite us.
  • If we do something like width: 0 or min-width: 0, we’re removing a useful constraint that is usually in place that prevents overflows, because now an element can become smaller than the content inside of it. I talked about this more in-depth in this video a few months back.

Sometimes we want things to overflow, but we want to introduce scrollbars, and there are a few issues that can come up when we do that.

The main one is when we use overflow-x or overflow-y: scroll, the other axis is changed to overflow: auto, which can have unintended side-effects.

Dealing with those can be frustrating, and sometimes even takes a reorganization of the DOM, with a few extra divs than you’d planned on using.

Knowing both of these are such a big pain point, though, I am going to think about a bit of extra content around the topics 🙂.


🔌 Shameless plug: I’m super excited to let you know that I’m giving my first-ever in-person workshop later this year! Hosted by Smashing, they’re doing their first ever round of workshops that aren’t directly tied to a conference.

My workshop is titled The New CSS Toolkit, where we’ll be exploring modern CSS techniques that help you write cleaner, more flexible, and more robust styles.

There will be a focus on what’s practical and useful today, with some looks at some exciting features to keep on eye on as well.

It is an in-person only workshop taking place in New York City on June 24th. If you’re interested, you can get more details or register for it here.


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

5 CSS tips every dev should know

video preview

I had a list of some fun ideas, but none of them were really worth making an entire video over, so I made a quick hits video where I look at single-color gradients (including a few use cases for them), user-select, the all property, masks, and taking advantage of containing blocks to be able to escape scroll containers.

Can I survive CSS Hell?

video preview

This was the live stream that I mentioned earlier. The start is when I talk about Figma, but if you’d prefer to jump to the game, go to about ~22:30 (there are timestamps in the video).

⚡ HTML & CSS Tip of the week

This week I take a quick look at the :placeholder-shown pseudo-class, including an interactive example showing what I think is a useful use-case for it.

🎙️ Podcast

The dicochomy of grid

show
The dicochomy of grid
Nov 14 · General Musings with Kev...
20:25
Spotify Logo
 

I’m a huge advocate for keeping CSS Grid as simple as possible, but I’m also a huge fan of subgrid which sort of forces us to have more complex grids. So, this week I talk about that conflict, and eventually I talk myself into how we can keep things simple (or, at least less complicated) even when using subgrid.

LISTEN ON: APPLE | SPOTIFY | YOUTUBE | RSS

Also, I’ve switched to a new host for the podcast. It looks like the RSS redirect is working fine, and it’s going out to both Spotify and Apple podcasts without issue, but if you are subsribed and have run into any problems, I’d appreciate if you hit reply and let me know.

🔗 Other awesome stuff around from the web

🏁

As promised, if anyone happens to teach (and I know there are a fair number who follow me who do), my first bit of advice is to try not to worry about teaching everything.

I know the reality of scope-creep and how hard it can be to not add “just one more thing”, and it always feels like so many things are essential to teach, but I’d put my focus on a very strong foundation.

Worry about the 20% of things they’ll use 80-90% of the time.

By taking that approach, there are a lot of things that you won’t cover, but if you covered that 20% well, that means the students understand the core principles, and so when they need to do something you haven’t taught them, it’s not that hard to figure out.

Even with Flexbox and Grid, both of those are big topics, but you can make a lot of layouts using them without going beyond the very basics of either one.

You can’t cover everything, so focus on the absolute most important, foundational parts (while keeping it fun, of course!), and if you do a good job, you’ve set them up for success.

I’d even say that’s more important than covering a lot of topics, as you’re also teaching them to be more independent and figure things out on their own as well.

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.
113 Cherry St #92768, Seattle, WA 98104-2205

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 bit of a different email this Sunday, as I don't have any new content to share (which is the first time I haven't had anything in a long time). Instead, I'm writing to let you know on Tuesday and Wednesday of this week, I’m giving a workshop with Frontend Masters called Modern CSS Fundamentals. The workshop is for anyone ready to move from doing their best to getting CSS to work to truly understanding it. Whether...

View this email in your browser (or share it with a friend!) Hello Reader, I’m going to keep the intro short on this ones because there is a lot going on in the What I’ve Been up to section, but before we jump into into that, two quick things: As an experiment for Interop 2026, Jake Archibald and the team at Firefox habe put together a way to gather more feedback on what features matter most to developers. So, if you head on over here, you can pick the proposals that are important to you, and...

View this email in your browser (or share it with a friend!) Hello Reader, A few weeks ago, I posted a video about the current state of the internet after I had a terrible AI-generated CSS article showing up in my news feed. I was saddened by how it was getting priority over quality content from sites like Piccalilli, Smashing Magazine, CSS-Tricks, and countless other excellent sources (I’ve put a bunch in the other links around the web section below if you’re looking for more to follow). At...