The following examples are some page layout examples and experiments. I have included with them information about the elements of CSS Grid Layout used.
This is a simple, non-responsive layout using the line-based placement properties. I have created a layout that is essentially an old school liquid layout with two fixed width columns and an auto stretching content area.
This is a simple, responsive layout using the line-based placement properties and three breakpoints.
I am using the shorthand grid-row
and grid-column
properties in this example.
A simple responsive layout with three breakpoints. This time I am using the grid-area
to define the named areas of the grid and describing the grid with the grid-template-areas
property within the Media Queries.
An example demonstrating how Grid can be used to create a flexible multiple column grid. This example uses the repeat keyword and named grid lines.
Creating a simple three column layout by placing items onto our 16 column grid, as an example of how this could be used in practice.
Taking the grid used by the Skeleton framework as an example. Demonstrating how CSS Grid Layout removes the need to describe layout in markup.
Taking the grid used in my Skeleton experiments and using that for a layout.
I was interested in whether I could recreate the example used inthis blog post about the Susy Grid System. Susy is a very clever semantic Grid system that relies on pre-processing CSS to calculate your grid.
A simple example used in my presentation for the Responsive Web Design Summit, to demonstrate using Grid for the main layout and Flexbox for UI items.
Playing with the Auto Placement algorithm and dense and sparse grid-auto-flow modes.
Read an in-depth article about how Grid Auto-Placement works from Manuel Rego Casasnovas who is working on the implementation.