41 lines
806 B
SCSS
Executable File
41 lines
806 B
SCSS
Executable File
/**
|
|
* Grid loop mixin
|
|
*/
|
|
|
|
@use "sass:math";
|
|
|
|
@mixin grid-loop($name){
|
|
@for $i from 0 through $grid-columns {
|
|
@if $i != 0 {
|
|
.col--#{$name}-#{$i} {
|
|
width: percentage(math.div($i, $grid-columns));
|
|
.row--flex & {
|
|
flex-basis: percentage(math.div($i, $grid-columns));
|
|
max-width: percentage(math.div($i, $grid-columns));
|
|
width: auto;
|
|
float: none;
|
|
}
|
|
}
|
|
}
|
|
.col--#{$name}-offset-#{$i} {
|
|
margin-left: percentage(math.div($i, $grid-columns));
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Clearfix
|
|
*/
|
|
|
|
@mixin clearfix {
|
|
&:before,
|
|
&:after {
|
|
content: " ";
|
|
display: table;
|
|
}
|
|
&:after {
|
|
clear: both;
|
|
}
|
|
}
|