Merge pull request #10 from pdcreis/patch-12

Update _grid.scss
This commit is contained in:
Mike Francis 2014-06-30 11:06:28 +01:00
commit 456e2788a2
1 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,9 @@
.container {
max-width: $max-width;
margin: 0 auto;
clear: both;
}
.row { .row {
@extend .clearfix; @extend .clearfix;
clear: both; clear: both;
@ -8,8 +14,8 @@
float: left; float: left;
padding-left: $gutter; padding-left: $gutter;
margin-bottom: $gutter; margin-bottom: $gutter;
.col & { .row {
margin-bottom: 0; margin-top: $gutter;
} }
} }
@ -17,17 +23,17 @@
$name: nth($breakpoint, 1); $name: nth($breakpoint, 1);
$declaration: nth($breakpoint, 2); $declaration: nth($breakpoint, 2);
@media only screen and #{$declaration}{ @media only screen and #{$declaration}{
@if $name == sd {
.col .col {
margin-bottom: $gutter;
&:last-child {
margin-bottom: 0;
}
}
}
@for $i from 1 through $grid-columns { @for $i from 1 through $grid-columns {
.col--#{$name}-#{$i} { .col--#{$name}-#{$i} {
width: percentage($i/$grid-columns); width: percentage($i/$grid-columns);
@if $name == sd {
.col {
margin-bottom: $gutter;
&:last-child {
margin-bottom: 0;
}
}
}
} }
.col--#{$name}-offset-#{$i} { .col--#{$name}-offset-#{$i} {
margin-left: percentage($i/$grid-columns); margin-left: percentage($i/$grid-columns);