Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active August 29, 2015 14:18
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 NetanelBasal/9c0007980ba79f6b8283 to your computer and use it in GitHub Desktop.
Save NetanelBasal/9c0007980ba79f6b8283 to your computer and use it in GitHub Desktop.
susy grid system
.row {
*zoom: 1;
}
.row:before, .row:after {
display: table;
content: '';
line-height: 0;
}
.row:after {
clear: both;
}
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
[class*="c-"] {
padding-right: 0.83333%;
padding-left: 0.83333%;
float: left;
}
.c-1 {
width: 8.33333%;
}
.c-2 {
width: 16.66667%;
}
.c-3 {
width: 25%;
}
.c-4 {
width: 33.33333%;
}
.c-5 {
width: 41.66667%;
}
.c-6 {
width: 50%;
}
.c-7 {
width: 58.33333%;
}
.c-8 {
width: 66.66667%;
}
.c-9 {
width: 75%;
}
.c-10 {
width: 83.33333%;
}
.c-11 {
width: 91.66667%;
}
.c-12 {
width: 100%;
}
@import "susy";
$col-nums: 12;
$susy: (
columns: $col-nums,
gutters: 1/4,
gutter-position: inside,
flow: rtl,
container: 90%
);
.row {
@include clearfix();
}
@include border-box-sizing;
[class*="c-"] {
@include gutters;
float: left;
}
@for $i from 1 through $col-nums {
.c-#{$i} {
width: span($i of 12);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment