Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Created April 26, 2016 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bastianallgeier/f3f01941324417f349304b96a98f937f to your computer and use it in GitHub Desktop.
Save bastianallgeier/f3f01941324417f349304b96a98f937f to your computer and use it in GitHub Desktop.
/* Grid */
.grid {
font-size: 0;
}
.grid > .column {
position: relative;
display: inline-block;
width: 100%;
font-size: 1rem;
vertical-align: top;
}
.grid > .column img {
width: 100%;
}
/* Grid Gutter Sizes */
.grid-gutter-1 {
margin-left: -1.5rem;
}
.grid-gutter-1 > .column {
padding-left: 1.5rem;
}
.grid-gutter-2 {
margin-left: -3rem;
}
.grid-gutter-2 > .column {
padding-left: 3rem;
}
@bastianallgeier
Copy link
Author

bastianallgeier commented Apr 26, 2016

@media screen and (min-width: 30em) {
  .column {
    width: 50%;
  }
}

@media screen and (min-width: 60em) {
  .column {
    width: 33.33%;
  }
}

@bastianallgeier
Copy link
Author

<div class="grid grid-gutter-1">
  <div class="column">
  </div>
  <div class="column">
  </div>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment