From 4ce6599b3ee5437d40ba8d650e1d66825b008e70 Mon Sep 17 00:00:00 2001 From: Pedro Reis Date: Wed, 25 Jun 2014 09:41:33 +0100 Subject: [PATCH] Create _grid.scss --- scss/base/_grid.scss | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scss/base/_grid.scss diff --git a/scss/base/_grid.scss b/scss/base/_grid.scss new file mode 100644 index 0000000..37a71d1 --- /dev/null +++ b/scss/base/_grid.scss @@ -0,0 +1,37 @@ +.row { + @extend .clearfix; + clear: both; + margin-left: -$gutter; +} + +.col { + float: left; + padding-left: $gutter; + margin-bottom: $gutter; + .col & { + margin-bottom: 0; + } +} + +@each $breakpoint in $breakpoints-list { + $name: nth($breakpoint, 1); + $declaration: nth($breakpoint, 2); + @media only screen and #{$declaration}{ + @for $i from 1 through $grid-columns { + .col--#{$name}-#{$i} { + width: percentage($i/$grid-columns); + @if $name == sd { + .col { + margin-bottom: $gutter; + &:last-child { + margin-bottom: 0; + } + } + } + } + .col--#{$name}-offset-#{$i} { + margin-left: percentage($i/$grid-columns); + } + } + } +}