barebones/assets/styles/vendor/simple-grid/_mixins.scss

39 lines
743 B
SCSS
Raw Normal View History

2017-06-06 16:23:36 +02:00
/**
* Grid loop mixin
*/
@mixin grid-loop($name){
@for $i from 0 through $grid-columns {
@if $i != 0 {
.col--#{$name}-#{$i} {
width: percentage($i/$grid-columns);
2019-01-08 11:52:31 +01:00
.row--flex & {
flex-basis: percentage($i/$grid-columns);
max-width: percentage($i/$grid-columns);
width: auto;
float: none;
}
2017-06-06 16:23:36 +02:00
}
}
.col--#{$name}-offset-#{$i} {
margin-left: percentage($i/$grid-columns);
}
}
}
/**
* Clearfix
*/
@mixin clearfix {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}