CSS in Depth

Own Your Tech Career / Keith J. Grant / Manning / March 2018

Rating: 4.5/5 🌕🌕🌕🌕🌗

Chrome / Firefox Dev Tools (and their precursor Firebug) made writing CSS much easier - you can experiment and see results in real-time. And this is a huge deal, even though modern web developers sometimes take that for granted (and don’t remember the pain of writing styles for Adobe Flex). The ease of writing CSS led to an interesting side effect - it’s common for engineers to misunderstand CSS (compared to, e.g., JS internals) and make mistakes, overlook trivial problems, or write messy and unmaintainable code. I’m one of these guys too, and decided it’s high time to fix that.

With that said, the book is perfect for people with at least basic web development experience, who want to learn CSS systematically. It starts with a part dedicated to the fundamentals - cascade, specificity, inheritance, units, and box model. Even if you have years of experience, you might still be surprised by some of the stuff there. For example, I didn’t really grok how specificity works until now (spoiler: there’s an algorithm, with very clear rules).

The second part focuses on the different layout approaches. There won’t be many surprises for engineers with a few years of experience, but it’s still worth taking a look at. I learned some new tricks.

The next part focuses on CSS at scale. A lot of cool stuff can be found here, but beware that some of these problems are already solved for you if you work with a front-end framework. There’s some to be desired on the CSS methodologies (like BEM) side - there’s just an honorable mention and I believe they deserved to be in the book.

Now that you know the basics and how to write maintainable CSS, the last part is dedicated to the “advanced” stuff - background, colors, typography, transitions, transforms, and animations. It is pretty in-depth and I really found it useful.

All-in-all, this is a really good book. At first, I was kind of skeptical, being used to resources like MDN. They are very comprehensive and do a great job for everyday work, but miss the step-by-step part. “CSS in Depth” approaches that really well and I highly recommend it for any web developer who wants to learn CSS the “proper” way.