logo
episode-header-image
Nov 2019
25m 22s

Hasty Treat - Tips For Writing Good CSS

Wes Bos & Scott Tolinski - Full Stack Javascript Web Developers
About this episode

In this Hasty Treat, Scott and Wes talk about tips for writing good CSS.

Sizzy - Sponsor

Sizzy - The browser made for developers and designers. Stop manually resizing your browser window and switching between devices so you can test responsive design. Speed up your workflow by developing and previewing your website on multiple devices at once. Sizzy includes powerful features and plugins that will help you take your web development game to the next level. Sizzy.co.

Show Notes

4:08 - Use a system

4:50 - Use overrides and cascading

  • Embrace the cascade
  • Don’t rewrite the same CSS over and over again
  • Understand why scoping is good

9:07 - Nail down typography early

  • You can always revisit if it isn’t what you need

10:36 - Pick a pattern and stick to it

  • BEM
  • Functional CSS
  • CSS in JS

14:39 - Don’t style based on element type (kind of) — a class should describe the component

17:09 - Good naming techniques

  • Describe what it is, not what it looks like
  • Thing
    • ThingChild
      • ThingChild-modifier
  • Scale sizes (e.g. s, m, l, xl)

21:43 - Other tips

  • Group like CSS together
  • Chunk into different files
  • Write good comments
  • CSS properties FTW

Links

Tweet us your tasty treats!

Up next
Oct 8
944: Is Coinbase Really Writing Half Their Code With AI?
Wes and Scott talk with Kyle Cesmat about how Coinbase is writing nearly half its code with AI—while keeping quality and security front and center. They dig into tools like Cursor and Claude Code, agent-driven workflows, code review challenges, and how AI is reshaping developer p ... Show More
49m 6s
Oct 6
943: Modern React with Ricky Hanlon (React Core Dev)
Scott and Wes sit down with Ricky Hanlon from the React core team at Facebook to dive into the latest features and APIs shaping modern React development. From transitions and Suspense to fetching strategies and future directions, this episode breaks down what’s next for React and ... Show More
38m 36s
Oct 1
942: Mental Health Q&A w/ Dr. Courtney Tolinski
Wes and Scott talk with Dr. Courtney Tolinski about supporting neurodivergent teammates, navigating workplace dynamics, and recognizing strengths beyond labels. They explore ADHD diagnosis and treatment, productivity mindsets, burnout, AI in mental health, and practical routines ... Show More
57m 44s
Recommended Episodes
Nov 2023
What's new in CSS land
Una Kravets, developer advocate at Google & web platform ambassador, joins Amal & Nick to take them CSS to school as they start this podcast in CSS kindergarten and end it with a Level-Up CSS Diploma. (LUCD?) We explore all the amazing features which have recently landed in CSS — ... Show More
1h 14m
Feb 2024
Episode 181 - Let Your Web Pages Talk With CSS
In this episode of Two Voice Devs, hosts Allen Firstenberg and Mark Tucker discuss the CSS Speech Module Level 1 Candidate Recommendation Draft, a standard that enables webpages to talk, developed in collaboration with the voice browser activity. They explore its features includi ... Show More
43m 6s
Feb 2023
Frontend Feud: CSS Podcast vs @keyframers
Una & Adam from The CSS Podcast defend their Frontend Feud title against challengers David & Shaw from the keyframers. Let’s get it on! Leave us a comment Changelog++ members save 6 minutes on this episode because they made the ads disappear. Join today! Sponsors: Sentry – Sessio ... Show More
51m 10s
Feb 2023
Frontend Feud: CSS Podcast vs @keyframers (JS Party #264)
Una & Adam from The CSS Podcast defend their Frontend Feud title against challengers David & Shaw from the keyframers. Let’s get it on! Leave us a comment Changelog++ members save 6 minutes on this episode because they made the ads disappear. Join today! Sponsors: Sentry – Sessio ... Show More
51m 10s
Oct 2023
585: Blog Redesign, Sounds on a Website, Accessibility Tests, and Safari 17
Show DescriptionChris redesigned his blog, using sounds on your website to make it seem fancy, what can't automated accessibility tests test, and what's new in Safari 17. Listen on Website →Links School dropoff and sweater weather season | Instagram Chris Coyier - Web craftsman, ... Show More
59m 4s
Oct 2023
589: CSS Functions, Read It Later, Making Money in Business, and More
Show DescriptionA quick bit of union news follow up, CSS function round up, Read It Later inside Feedbin, fun uses for a Stream Deck+, how to turn up the money dial in your own business, and having the audacity to call yourself a publisher. Listen on Website →Links A Couple of Ne ... Show More
56m 54s
Dec 2023
Leveling up technology
Join hosts Walt Cooley and Matti McBride as they dive into Cooley’s recent presentation “Level-Up” given at the Amelicor Herd and Feed Management Conference in this episode of the Progressive Dairy Podcast. Learn how to level up technology on your operation, champion an employee ... Show More
32m 25s
Feb 2024
Ultra-Niche Positioning: How to Find Success By Going SUPER Narrow
I’m so f*cking happy to announce that ​my book, Stand The F*ck Out, is officially available for PURCHASE​! To buy the book—and more!—DIRECTLY from us and support our small business, go to: https://book.stfo.ioFree Shipping Worldwide • Ripped Apart by 70+ Marketers • Money-Back Gu ... Show More
57m 59s
Feb 2024
Networking Nightmares - Non-Mutual Follow Up • BEP 69
⭐️ Book a 1 to 1 English Session with Rob: https://www.energeticenglish.com/coaching📺 Watch: Networking Nightmares🔗Blog: https://www.thebusinessenglishpodcast.com/blog-ep69Bored of lukewarm networking leads fizzling out? This episode tackles the art of the "non-mutual follow-up ... Show More
20m 37s
Jul 2021
Becoming A Master of Microsoft Word
Guest Marie Stockton is an estate planning lawyer laser-focused on making sure her clients understand what they’re signing. She’s mastering document prep tools to assure they have the look and feel that encourages reading and comprehension. Topics: Making the shift from WordPerfe ... Show More
33m 2s