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
Yesterday
918: Extreme Native Perf on the Web with Superhuman
Wes and Scott talk with Loïc Houssier about how Superhuman builds lightning-fast, delightfully-designed email software. They dig into engineering philosophy, offline-first architecture, local databases, AI-powered productivity, and what it takes to create tools that people love. ... Show More
48m 54s
Jul 7
917: AI Tools You Should Know
Scott and Wes round up the hottest AI tools you should have on your radar; from text-to-speech wizards to self-hosted image generators. They break down what they’re using, what’s worth paying for, and which tools are changing their workflows. Show Notes 00:00 Welcome to Syntax! 0 ... Show More
37m 48s
Jul 2
916: I got fired, what should I focus on?
In this potluck episode of Syntax, Wes and Scott answer your questions about maintaining popular open-source projects, where to start after a layoff, impostor syndrome, Scott’s recording setup, whether a computer science degree is still worth it in the age of AI, and more! Show N ... Show More
58m 24s
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
Apr 2022
Typography in Digital Interfaces | Thomas Girard, Assistant Professor of Design
Episode 62 Show Notes: Typography can help make interfaces more user-friendly, informative, and visually appealing when used effectively. However, knowing which ones to use can be tricky with many different fonts available. In this episode, Thomas Girard provides tips on using ty ... Show More
53m 46s
Jul 2024
Episode 78: Less Writing, More Hacking - Reporting Efficiency Techniques
Episode 78: In this episode of Critical Thinking - Bug Bounty Podcast we’re talking about writing reports. We share some tips that we’ve learned, and discuss ways that AI can (and can’t) help with that process. We also talk about the benefit of using tools like Fabric, Loom, and ... Show More
1h 6m
Jul 2023
575: CSS Errors, Proxy and Reverse Proxy, and What’s The Edge?
Bluesky adds first class support for urls as a username, text-wrap pretty update, sqwunching text update, should CSS spit out errors, anchor functionality, what does the edge mean, eSports and bowling, how to test websites on slower CPUs, and what does proxy or reverse proxy mean ... Show More
1 h
Jun 2024
How to Scale your Startup with Growth Levers: Matt Lerner
Sponsored by Brilliant - visit https://brilliant.org/DeepDive/ and the first 200 of you will get 20% off Brilliant's annual premium subscription. I’ve built a brand new community for like-minded people called Productivity Lab. We’ll have online classes, workshops, and coaching to ... Show More
2h 32m