Copy environment

Grid

Start by adding an element with a class of .grid. This will create a horizontal block to contain vertical columns. Then add elements with a .grid__col class within that row. Specify the widths of each column with .grid__col--xs-#, .grid__col--sm-#, .grid__col--md-# and .grid__col--lg-# classes. Responsive modifiers enable specifying different column sizes, offsets, alignment and distribution at xs, sm, md & lg viewport widths. Bare in mind that the layout is mobile-first. You can stack modifiers if you want to achieve different alignment depending on screen size.

<div class="grid " style=''>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">1/2 sm</div>
    </div>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">1/2 sm</div>
    </div>
    <div class="grid__col grid__col--sm-4">
        <div class="sg-box">1/3 sm</div>
    </div>
    <div class="grid__col grid__col--sm-4">
        <div class="sg-box">1/3 sm</div>
    </div>
    <div class="grid__col grid__col--sm-4">
        <div class="sg-box">1/3 sm</div>
    </div>
    <div class="grid__col grid__col--sm-6 grid__col--md-3">
        <div class="sg-box">1/2 sm, 1/4 md</div>
    </div>
    <div class="grid__col grid__col--sm-6 grid__col--md-3">
        <div class="sg-box">1/2 sm, 1/4 md</div>
    </div>
    <div class="grid__col grid__col--sm-6 grid__col--md-3">
        <div class="sg-box">1/2 sm, 1/4 md</div>
    </div>
    <div class="grid__col grid__col--sm-6 grid__col--md-3">
        <div class="sg-box">1/2 sm, 1/4 md</div>
    </div>
</div>
{
  "language": "en-US",
  "columns": [
    {
      "class": "grid__col--sm-6",
      "text": "1/2 sm"
    },
    {
      "class": "grid__col--sm-6",
      "text": "1/2 sm"
    },
    {
      "class": "grid__col--sm-4",
      "text": "1/3 sm"
    },
    {
      "class": "grid__col--sm-4",
      "text": "1/3 sm"
    },
    {
      "class": "grid__col--sm-4",
      "text": "1/3 sm"
    },
    {
      "class": "grid__col--sm-6 grid__col--md-3",
      "text": "1/2 sm, 1/4 md"
    },
    {
      "class": "grid__col--sm-6 grid__col--md-3",
      "text": "1/2 sm, 1/4 md"
    },
    {
      "class": "grid__col--sm-6 grid__col--md-3",
      "text": "1/2 sm, 1/4 md"
    },
    {
      "class": "grid__col--sm-6 grid__col--md-3",
      "text": "1/2 sm, 1/4 md"
    }
  ]
}

Vertical Align

Vertical alignment can be either adjusted separately column by column using grid__col--top-#, grid__col--middle-#, grid__col--bottom-# (example below) or by whole group of columns by using grid modifier .grid--top-#, .grid--middle-#, .grid--bottom-#.

<div class="grid " style='height: 150px;'>
    <div class="grid__col grid__col--sm-4 grid__col--top--sm">
        <div class="sg-box">top</div>
    </div>
    <div class="grid__col grid__col--sm-4 grid__col--middle-sm">
        <div class="sg-box">middle</div>
    </div>
    <div class="grid__col grid__col--sm-4 grid__col--bottom-sm">
        <div class="sg-box">bottom</div>
    </div>
</div>
{
  "language": "en-US",
  "style": "height: 150px;",
  "columns": [
    {
      "class": "grid__col--sm-4 grid__col--top--sm",
      "text": "top"
    },
    {
      "class": "grid__col--sm-4 grid__col--middle-sm",
      "text": "middle"
    },
    {
      "class": "grid__col--sm-4 grid__col--bottom-sm",
      "text": "bottom"
    }
  ]
}

Horizontal Align

Horizontal alignment can be adjusted by whole group of columns using grid modifier .grid--start-#, .grid--center-#, .grid--end-#.

<div class="grid grid--center-sm" style=''>
    <div class="grid__col grid__col--sm-2">
        <div class="sg-box">center</div>
    </div>
    <div class="grid__col grid__col--sm-12">
        <div class="sg-box">center</div>
    </div>
    <div class="grid__col grid__col--sm-3">
        <div class="sg-box">center</div>
    </div>
    <div class="grid__col grid__col--sm-3">
        <div class="sg-box">center</div>
    </div>
</div>
{
  "language": "en-US",
  "modifier": "grid--center-sm",
  "columns": [
    {
      "class": "grid__col--sm-2",
      "text": "center"
    },
    {
      "class": "grid__col--sm-12",
      "text": "center"
    },
    {
      "class": "grid__col--sm-3",
      "text": "center"
    },
    {
      "class": "grid__col--sm-3",
      "text": "center"
    }
  ]
}

Equal Height

Make grid colums with equal height by using grid modifier .grid--equalheight.

<div class="grid grid--equalheight" style=''>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">short column</div>
    </div>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">long column lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis deleniti fuga nostrum soluta totam sit magnam esse aliquid nisi, corrupti itaque, officiis minus aperiam eos iste, recusandae, rerum necessitatibus adipisci. Lorem
            ipsum dolor sit amet, consectetur adipisicing elit. Corporis deleniti fuga nostrum soluta totam sit magnam esse aliquid nisi, corrupti itaque, officiis minus aperiam eos iste, recusandae, rerum necessitatibus adipisci.</div>
    </div>
</div>
{
  "language": "en-US",
  "modifier": "grid--equalheight",
  "columns": [
    {
      "class": "grid__col--sm-6",
      "text": "short column"
    },
    {
      "class": "grid__col--sm-6",
      "text": "long column lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis deleniti fuga nostrum soluta totam sit magnam esse aliquid nisi, corrupti itaque, officiis minus aperiam eos iste, recusandae, rerum necessitatibus adipisci. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis deleniti fuga nostrum soluta totam sit magnam esse aliquid nisi, corrupti itaque, officiis minus aperiam eos iste, recusandae, rerum necessitatibus adipisci."
    }
  ]
}

Justify

Divide the space between (.grid--between-#, example below) or around (grid--around-#) columns.

<div class="grid grid--between-sm" style=''>
    <div class="grid__col grid__col--sm-3">
        <div class="sg-box">column</div>
    </div>
    <div class="grid__col grid__col--sm-3">
        <div class="sg-box">column</div>
    </div>
</div>
{
  "language": "en-US",
  "modifier": "grid--between-sm",
  "columns": [
    {
      "class": "grid__col--sm-3",
      "text": "column"
    },
    {
      "class": "grid__col--sm-3",
      "text": "column"
    }
  ]
}

No Gutter

Use columns without gutter by using grid modifier .grid--no-gutter.

<div class="grid grid--no-gutter" style=''>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">first column</div>
    </div>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">second column</div>
    </div>
</div>
{
  "language": "en-US",
  "modifier": "grid--no-gutter",
  "columns": [
    {
      "class": "grid__col--sm-6",
      "text": "first column"
    },
    {
      "class": "grid__col--sm-6",
      "text": "second column"
    }
  ]
}

Offset

Move columns to the right using .grid__col--offset-sm-# classes. These classes increase the left margin of a column by # columns.

<div class="grid " style=''>
    <div class="grid__col grid__col--sm-1 grid__col--offset-sm-11">
        <div class="sg-box"></div>
    </div>
    <div class="grid__col grid__col--sm-2 grid__col--offset-sm-10">
        <div class="sg-box"></div>
    </div>
    <div class="grid__col grid__col--sm-3 grid__col--offset-sm-9">
        <div class="sg-box"></div>
    </div>
    <div class="grid__col grid__col--sm-4 grid__col--offset-sm-8">
        <div class="sg-box"></div>
    </div>
    <div class="grid__col grid__col--sm-5 grid__col--offset-sm-7">
        <div class="sg-box"></div>
    </div>
    <div class="grid__col grid__col--sm-6 grid__col--offset-sm-6">
        <div class="sg-box"></div>
    </div>
</div>
{
  "language": "en-US",
  "columns": [
    {
      "class": "grid__col--sm-1 grid__col--offset-sm-11"
    },
    {
      "class": "grid__col--sm-2 grid__col--offset-sm-10"
    },
    {
      "class": "grid__col--sm-3 grid__col--offset-sm-9"
    },
    {
      "class": "grid__col--sm-4 grid__col--offset-sm-8"
    },
    {
      "class": "grid__col--sm-5 grid__col--offset-sm-7"
    },
    {
      "class": "grid__col--sm-6 grid__col--offset-sm-6"
    }
  ]
}

Order

You can reverse order by using .grid--reverse-# modifier or control column directly via .grid__col--first-# (example below) or .grid__col--last-#. Reset the order rule by using .grid__col--original-#.

<div class="grid " style=''>
    <div class="grid__col grid__col--sm-6">
        <div class="sg-box">first in DOM, but second from md screen size</div>
    </div>
    <div class="grid__col grid__col--sm-6 grid__col--first-md">
        <div class="sg-box">second in DOM, but first from md screen size</div>
    </div>
</div>
{
  "language": "en-US",
  "columns": [
    {
      "class": "grid__col--sm-6",
      "text": "first in DOM, but second from md screen size"
    },
    {
      "class": "grid__col--sm-6 grid__col--first-md",
      "text": "second in DOM, but first from md screen size"
    }
  ]
}