General Musings with Kevin Powell

Should We Stop Teaching Width and Height to CSS Beginners?


Listen Later

The survey link (I lied, it's 3 questions, but they're all super short!): https://3g5kprf8905.typeform.com/to/laWyvkB6

In this episode, I talk about why I think we should appreciate browser defaults more when writing CSS, and ended up having a mini lightbulb moment about teaching CSS - maybe we shouldn't introduce width and height properties right away to beginners? It seems like that just creates habits we have to unlearn later.

I talk about how block elements naturally want to take up the full width but only be as tall as they need to be, and why working with these behaviors (instead of fighting them) makes for better responsive designs. I go on a bit of a tangent about setting constraints with min/max values rather than forcing exact dimensions.

Along the way, I point out some common mistakes I see a lot - like using that universal reset with the star selector (please don't do that!) or declaring the same font-family fifteen times when you could just put it on the body once.

...more
View all episodesView all episodes
Download on the App Store

General Musings with Kevin PowellBy Kevin Powell

  • 5
  • 5
  • 5
  • 5
  • 5

5

9 ratings


More shows like General Musings with Kevin Powell

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

284 Listeners

ShopTalk by Chris Coyier & Dave Rupert

ShopTalk

501 Listeners

Making Sense with Sam Harris by Sam Harris

Making Sense with Sam Harris

26,318 Listeners

No Such Thing As A Fish by No Such Thing As A Fish

No Such Thing As A Fish

4,830 Listeners

THE ADAM BUXTON PODCAST by ADAM BUXTON

THE ADAM BUXTON PODCAST

1,314 Listeners

Soft Skills Engineering by Jamison Dance and Dave Smith

Soft Skills Engineering

273 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

984 Listeners

REWORK by 37signals

REWORK

210 Listeners

Stay Tuned with Preet by Preet Bharara

Stay Tuned with Preet

32,410 Listeners

CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

CoRecursive: Coding Stories

189 Listeners

The Prof G Pod with Scott Galloway by Vox Media Podcast Network

The Prof G Pod with Scott Galloway

5,260 Listeners

The Rest Is Politics by Goalhanger

The Rest Is Politics

3,152 Listeners

The Rest Is Politics: Leading by Goalhanger

The Rest Is Politics: Leading

961 Listeners

Better Offline by Cool Zone Media and iHeartPodcasts

Better Offline

461 Listeners

The Pragmatic Engineer by Gergely Orosz

The Pragmatic Engineer

53 Listeners