barebones/scss/base/_grid.scss

44 lines
788 B
SCSS
Raw Normal View History

2014-06-29 11:29:27 +02:00
.container {
max-width: $max-width;
margin: 0 auto;
clear: both;
}
2014-06-25 10:41:33 +02:00
.row {
@extend .clearfix;
clear: both;
margin-left: -$gutter;
}
.col {
float: left;
padding-left: $gutter;
margin-bottom: $gutter;
2014-06-29 11:29:27 +02:00
.row {
margin-top: $gutter;
2014-06-25 10:41:33 +02:00
}
}
@each $breakpoint in $breakpoints-list {
$name: nth($breakpoint, 1);
$declaration: nth($breakpoint, 2);
@media only screen and #{$declaration}{
2014-06-29 11:29:27 +02:00
@if $name == sd {
.col .col {
margin-bottom: $gutter;
&:last-child {
margin-bottom: 0;
}
}
}
2014-06-25 10:41:33 +02:00
@for $i from 1 through $grid-columns {
.col--#{$name}-#{$i} {
width: percentage($i/$grid-columns);
}
.col--#{$name}-offset-#{$i} {
margin-left: percentage($i/$grid-columns);
}
}
}
}