Skip to content

Instantly share code, notes, and snippets.

@EdCharbeneau
Created January 30, 2014 17:25
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 EdCharbeneau/8713896 to your computer and use it in GitHub Desktop.
Save EdCharbeneau/8713896 to your computer and use it in GitHub Desktop.
A super simple, and minimal grid system.
/*
A simple grid system
*/
$layout-width: 980px;
$gutter:24px;
$small-device-width: 767px;
$vertical-whitespace: 20px;
// Predefined column widths
//golden ratio
$golden-small: 38.2%;
$golden-large: 61.8%;
//thirds
$one-third: 33.33%;
$two-thirds: 66.66%;
//quaters
$one-quarter: 25%;
$one-half: 50%;
$three-quarters: 75%;
@import "compass";
* {
@include box-sizing(border-box);
}
// Grid Mixins
@mixin row() {
margin: 0 auto;
max-width: $layout-width;
*zoom: 1;
padding: $vertical-whitespace 0;
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin column($column-width:100%) {
float: left;
padding: 0 $gutter;
width: $column-width;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment