The New CSS Layout
I spent time last winter working through the basics of Grid layout in CSS, since it was about to drop in several browsers, I wanted to finally figure out how it worked and how I could use it. And I’ve been using flexbox for quite some time, so I’ll admit to some hesitation when Rachel Andrew’s latest book on layout came out, The New CSS Layout.
But I’m glad, in the end, that I purchased the book and gave it a read. Chapters 4 and 5, on alignment and responsive respectively, made the book worth the money. Rachel’s been working with the new layout specs for years and contributing to them, and in this book she shows so many great ways to make the most of them. We all know that flexbox solved centering for us, finally, but grid solves so many issues as well. And if you get to know the various ways in which you can lay things out, you’ll be able to do better layouts with less markup and less CSS.
And don’t worry, I can hear some of you wondering about older browsers, but Rachel’s got you covered there as well, and the key is a combination of feature queries and overriding things. It works, and it works well. I’m currently working on a project where Grid is being implemented with flexbox as a fallback.
And, just as importantly, Rachel’s concerned about accessibility and how using all of the new features can be quite disruptive for keyboard users. This book, as is the norm for A Book Apart, is a quick read, but full of information. And if you haven’t had a go at playing around with grid, it’s the perfect book to give you confidence and get you started on using the new layouts available in CSS right now.