Write Better CSS

This is a guide for any­one who knows how to cobble a page togeth­er with CSS, but isn’t sure how to be good at CSS.

You’ve put a few stylesheets togeth­er before, but keep find­ing your­self in a mess by the end. Let’s get started.

Get started

Reas­on for this guide #

One of the best things about CSS is it’s low bar­ri­er to entry, it’s so easy to pickup and make things! A little background-color: red there, a little font-family: Comic Sans MS here. Boom! You’re cooking!

But this gentle learn­ing curve reg­u­larly proves to be a double-edged sword. Begin­ners stop learn­ing and improv­ing early on, sat­is­fied that they get” CSS. They’re left with a half-baked idea of what good CSS looks like, which paves the way to spa­ghetti stylesheets. 😢

This guide aims to take you the rest of the way, to Bet­ter CSS, without the blood, sweat and tears.

What’s covered? #

The guide is broken into a series of les­sons that cov­er gen­er­al CSS con­cepts, strategies for man­aging your stylesheets, and also deep-dives into spe­cif­ic top­ics. It includes:

  • What good and bad CSS looks like (warn­ing: con­tains opinions).
  • What you can do to stop bad CSS rot­ting your stylesheets from the inside out.
  • Essen­tial front-end tool­ing and archi­tec­ture patterns.
  • Some of the more com­plic­ated and unin­tu­it­ive CSS prop­er­ties that often get ignored when learn­ing CSS.

Who’s this guide for? #

This guide is for any­one who feels their CSS skills have plat­eaued at pass­able, but want to step up to the next level.

It’s for the full-stack engin­eers who know enough CSS to get by, but not enough to flour­ish. It’s for those fresh to front-end devel­op­ment that want to gain a more advanced understanding.

Let’s talk #

Hi, I’m Joe For­shaw, the author. If you have any ques­tions, com­ments or cor­rec­tions, please reach out to me on Twit­ter or by email.

Lessons

  • Lesson 1: Specificity
  • Lesson 2: Scope
  • Lesson 3: Naming
  • Lesson 4: Variations
  • Lesson: BEM Coming Soon
  • Lesson: SCSS Coming Soon
  • Lesson: position Deep Dive Coming Soon
  • Lesson: Reusability Coming Soon
  • Lesson: Units Coming Soon
  • Lesson: Media Queries Coming Soon
  • Lesson: display Deep Dive Coming Soon
  • Lesson: Flexbox Coming Soon
  • Lesson: Grid Coming Soon
  • Lesson: Inheritance Coming Soon
  • Lesson: Layout vs Aesthetics Coming Soon
  • Lesson: Fixing Bad CSS Coming Soon
  • Lesson: Composability Coming Soon
  • Lesson: File Organisation Coming Soon
  • Lesson: Accessibility Coming Soon