CSS is a mess. We all love it, but it’s a mess. I liken it to English: there are a bunch of rules, and you can learn them. But sometimes you’re better off just trying shit and seeing what works and what doesn’t. Magic is a codification of what I’ve learned in that crazy process.

The material in this textbook is intermediate-to-advanced. It assumes an understanding of the CSS syntax, cascading and inheritance, and commonly used selectors. It also assumes you’ve had enough experience with CSS to have learned not to make these common mistakes anymore.

I teach a weekly course to HubSpot engineers for which this is the textbook. The potions listed on the home page are used for the workshops in the latter half of each lesson.

As always, feedback is welcome. I hope you enjoy reading Magic.