Update _grid.scss
This commit is contained in:
parent
856c40738e
commit
f693a926d6
|
@ -18,25 +18,38 @@
|
||||||
padding-left: $gutter;
|
padding-left: $gutter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@each $breakpoint in $breakpoints-list {
|
@mixin grid-loop($name){
|
||||||
$name: nth($breakpoint, 1);
|
@for $i from 1 through $grid-columns {
|
||||||
$declaration: nth($breakpoint, 2);
|
.col--#{$name}-#{$i} {
|
||||||
@media only screen and #{$declaration}{
|
width: percentage($i/$grid-columns);
|
||||||
@if $name == sd {
|
|
||||||
.col .col {
|
|
||||||
margin-bottom: $gutter;
|
|
||||||
&:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@for $i from 1 through $grid-columns {
|
.col--#{$name}-offset-#{$i} {
|
||||||
.col--#{$name}-#{$i} {
|
margin-left: percentage($i/$grid-columns);
|
||||||
width: percentage($i/$grid-columns);
|
|
||||||
}
|
|
||||||
.col--#{$name}-offset-#{$i} {
|
|
||||||
margin-left: percentage($i/$grid-columns);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@each $breakpoint in $breakpoints-list {
|
||||||
|
|
||||||
|
$name: nth($breakpoint, 1);
|
||||||
|
$declaration: nth($breakpoint, 2);
|
||||||
|
|
||||||
|
@if $name == ld {
|
||||||
|
@include grid-loop($name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@else {
|
||||||
|
@media only screen and #{$declaration} {
|
||||||
|
@if $name == sd {
|
||||||
|
.col .col {
|
||||||
|
margin-bottom: $gutter;
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include grid-loop($name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue