Note: This post was originally written as a letter to an individual needing help from Reddit. Since it was originally written (in March 2018), much has changed in the CSS Grid world. Many more resources have been created.
I have completely rewritten this post, to make it easier to maintain, and to be more complete.
SorryOpening paragraph of original post.
,it took me a few days, but I haven’t been able to write a blog post. So I will just give you the links and sequence that I have studied them. They are all free.
CSS Grid (the Subject)
Learning CSS Grid should now be the de facto way CSS layout is taught. But it is only one part of effectively working with CSS. Other sub-subjects include: Typography, Animation, Images and Accessibility (Just to name a few.)
The assumption is, “If you’re here, you see a value in learning about CSS Grid”. However, just in case… CSS Grid is a newly adopted CSS syntax for positioning and laying out your elements for a web page and therefore, website. It allows for more creative control and ensures that website authors can communicate their message in the most effective way without being hampered by previous constraints in the CSS language.
Furthermore, CSS Grid now allows for clearer, more concisely written code making the stylesheets and code more maintainable. An added bonus to using CSS Grid and having less code is faster loading
This post is organized into several different sections to help categorize and reference the resources and information.
- HTML and CSS Basics
- Mobile First is still Mobile First
- CSS Flexbox and CSS Grid
- CSS Grid Basics
- CSS Grid Courses
- CSS Grid References and Cheat sheets
- CSS Grid Practice
- Advanced CSS Grid
HTML and CSS basics
Reviewing the basics for HTML and CSS isn’t a bad idea. Here are a few resources to take a look at. You could go through each of them, but probably one will be enough to ensure a basic understanding.
Algonquins Design, a group from Canada, has an excellent six part web developer course. Only “Web Dev 1” is needed to understand the basics to get into writing CSS Grid based layouts. I recommend doing all six parts at some point in your learning path.
Mobile First is still Mobile First
Mobile-First Responsive web design is the idea that that we design our websites with a mobile device as the primary design point. What this means is that we deliver assets and the least amount of weight (with regards loading times) as the standard. Then as the devices get bigger, as is normally the case also the bandwidth speed – we add more design elements but only for those bigger devices.
A good little primer on Mobile First Design by JustInMind.
An excellent resource on the theory of Mobile-First with practical examples. UXPin on Mobile-First Responsive Design.
This little section about Mobile-First is to get you to think primarily about how to create your HTML and the source order of your content. Source order is the physical coded order of which elements go where and when. This is important for accessibility, and semantic meaning. But also on mobile, the experience is very different – it’s basically stacks of content.
CSS Flexbox and CSS Grid
CSS Flexbox is CSS that has been more broadly implemented across browsers. There are some overlap features and functions between CSS Flexbox and CSS Grid. I recommend using Flexbox as a first choice where it is possible. CSS Flexbox and CSS Grid work very well together, nested and otherwise.
You can get more practice and develop muscle memory for CSS Flexbox with the Flexbox Froggy game.
Wes Bos created a Flexbox video tutorial series. I recommend taking this Flexbox Course after the previous two links. He calls it, “What is Flexbox“.
A few CSS Flexbox references and resources
CSS Grid Basics
The CSS Grid Garden game. Practicing and gain muscle memory for the basic CSS Grid syntax and thought process.
CSS Grid Courses
A 10 video course by Rachel Andrew to getting you started with CSS Grid. If you study nothing else. Study this.
Traversy Media gives you a 30 minute CSS Grid overview in this video.
CSS Grid References and Cheat Cheats
This cheat sheet helps you to visualize the CSS grid when you’re trying to figure out the syntax.
Another CSS Grid tool/cheat sheet that helps you create code.
Another excellent CSS-tricks resource. This on the Guide to CSS Grid.
FreeCodeCamp offers another reference for CSS Grid.
More resources and a free CSS Grid Builder. (I don’t think you should use the Grid Builder as CSS Grid syntax is already concise and you should just finish going through these resources until you really get it.)
A different curated list of resources for learning CSS Grid, compiled by Rachel Andrew.
Of course you need to practice.
CSS Grid practice
Jen Simmons gives you fifteen exercises to learn CSS Grid.
More examples of layouts made with CSS Grid.
Jen Simmons let’s use explore various unique layouts using CSS Grid.
CSS Grid Layout practice
Rachel Andrew’s Grid by Example has layouts and coding examples for CSS Grid. This is the site that started it all (with CSS Grid).
A walk through and tutorial/explanation for a tricky but simple looking web page layout using CSS Grid.
An almost great tutorial for complex CSS Grid layouts. I include it because I feel it is important and needs to be taught. Unlike most resources on this list, this one is not spoon feeding you.
This very excellent tutorial on How to build a Complicated CSS Grid. I wish more articles and tutorials applied the theory to a real design like this tutorial.
CSS Grid and Flexbox
A website page dedicated to showing Flexbox fallback techniques when CSS Grid won’t work (on older browsers).
Specific CSS Grid applications for learning
Centering with CSS Grid, and older methods compared to each other.
Rachel Andrew once again solves (and explains) how to have an element break out of a CSS Grid column.
A short tutorial on CSS Grid and a mobile-first approach to a design with CSS Grid.
An excellent article and
Another walk through using CSS Grid to build a card component.
Excellent tutorial for learning CSS Grid by making a simple calculator.
A responsive footer using CSS Grid and no media queries.
Make a photo gallery with CSS Grid.
Another tile layout article using CSS Grid.
A codepen exmaple of making an Instagram layout using CSS Grid.
Advanced CSS Grid
In this section, I have listed resources that I recommend after getting a good handle on CSS Grid. This section comprises of articles and explanations regarding the finer points of using CSS Grid.
A look and explanation about start and end lines within CSS Grid and CSS Flexbox.
Supporting older browsers and using fallbacks for CSS Grid.
This article gives a possible solution, and various exceptions, for using an Autoprefixer to help with backward compatibility and CSS Grid.
Using CSS Grid to make CSS Variables + CSS Grid
Another look at CSS Variables and CSS Grid.
Using pseudo elements and CSS Grid. This is eye opening.
A thorough explanation regarding the possible techniques and choices using CSS Grid including accessibility concerns.
A thorough look about using CSS Grid and supporting older browsers by Smashing Magazine.