Grid

Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, five default responsive tiers, and dozens of predefined classes.

How it works

Breaking it down, here’s how the grid system comes together:

  • Our grid supports five responsive breakpoints. Breakpoints are based on min-width media queries, meaning they affect that breakpoint and all those above it (e.g., .col-sm-4 applies to sm, md, lg, and xl). This means you can control container and column sizing and behavior by each breakpoint.
  • Containers center and horizontally pad your content. Use .container for a responsive pixel width or .container-fluid for width: 100% across all viewports and devices.
  • Rows are wrappers for columns. Each column has horizontal padding (called a gutter) for controlling the space between them. This padding is then counteracted on the rows with negative margins to ensure the content in your columns is visually aligned down the left side.
  • Columns are incredibly flexible. There are 12 template columns available per row, allowing you to create different combinations of elements that span any number of columns. Column classes indicate the number of template columns to span (e.g., col-4 spans four). widths are set in percentages so you always have the same relative sizing.

Grid options

Grayshift’s grid system can adapt across all five default breakpoints, and any breakpoints you customize. The five default grid tiers are as follow:

  • xs: 0;
  • sm: 576px;
  • md: 768px;
  • lg: 992px;
  • xl: 1200px;

Example

Grayshift’s grid system uses a series of containers, rows, and columns to layout and align content. It’s built with flexbox and is fully responsive. Below is an example and an in-depth explanation for how the grid system comes together.

One of three columns

One of three columns

One of three columns

<div class="container">
  <div class="row">
    <div class="col-md">
      One of three columns
    </div>
    <div class="col-md">
      One of three columns
    </div>
    <div class="col-md">
      One of three columns
    </div>
  </div>
</div>