If you find yourself wrestling with CSS layout, it’s likely you’re making decisions for browsers they should be making themselves. Through a series of simple, composable layouts, Every Layout will teach you how to better harness the built-in algorithms that power browsers and CSS.
Employing algorithmic layout design means doing away with @media breakpoints, “magic numbers”, and other hacks, to create context-independent layout components. Your future design systems will be more consistent, terser in code, and more malleable in the hands of your users and their devices.
Big-picture CSS architecture is one of the biggest holes in my web knowledge. When I saw Heydon Pickering and Andy Bell (both of whom I've read for years) wrote a course/book about it together, it was an easy buy.
The world wide web is an amazing space. A philosophy espoused by Heydon and Andy (and all my favorite web evangelists like Jeremy Keith and Baldur Bjarnason) that resonates with me is: go with the grain of the web. There are powerful defaults in how browsers interpret HTML and CSS; use them. Instead of avoiding the CSS cascade, say, learn how it works and use it to write less code.
Another way to write less code: identify re-usable patterns. This book is (currently) 12 layouts you've probably implemented over and over, like The Sidebar and The Icon. The authors explain how they built a generic implementation of each pattern, along with the code and examples.
The book starts with more basic topics like Units and Modular Scale that are helpful if you're starting out and a great review otherwise. This section and the first pattern are available free at https://every-layout.dev, so at least give those a read if you're interested in the topic.
Such a weird way to format a book. Does every blogpost aspire to be an ebook one day nowadays?
Until the layout part starts the book was basically perfect. But the actual original content, the layout was pretty over the place and wanted to be more of an interactive blog post than a book. But at the same time, because of limitations of a PDF, it was also not as interactive as necessary.
The main part of the book also was guilty of some wild goose chases, which were artifacts from previous editions that worked with a more limited set of tools. I don't see the value of chasing a harder way to do things only to discover there actually is a way easier way, as exemplified with the discussion of negative margins in the context without the gap property.
I still learned so much from the book, so I am giving it a 4 stars.
I found it helpful for learning CSS faster by going through the common CSS layout. However, I struggled with the custom component section as the code was not included in the book, requiring me to visit a website. Overall, the rest of the book was well-written and provided practical insights into CSS layout techniques.