scss-library/components/01_Layouts/flexGrid/_flexGrid.scss
2020-08-23 11:38:45 +02:00

37 lines
606 B
SCSS

@mixin RV-FlexGrid--sameHeight($-inline: false) {
@if $-inline {
grid-auto-rows: 1fr;
}
@if not $-inline {
&__Container {
grid-auto-rows: 1fr;
}
}
}
@mixin RV-FlexGrid($item_width: 300px, $item_height: 300px) {
&__Container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax($item_width, 1fr));
grid-template-rows: repeat(auto-fill, $item_height);
grid-auto-rows: $item_height;
&--sameHeight {
@include RV-FlexGrid--sameHeight(true);
}
&--spacing {
gap: 10px;
}
}
&__Item {
@include RV-AlignContent;
}
}
.RV-FlexGrid{
@include RV-FlexGrid;
}