fix
This commit is contained in:
parent
58842c665e
commit
c398282688
3 changed files with 6 additions and 39 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
@import "mixin/breakpoint";
|
||||
@import "mixin/layout";
|
||||
@import "mixin/card";
|
||||
|
||||
@import "config/config";
|
||||
@import "config/breakpoints";
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
@use 'sass:list';
|
||||
|
||||
/*
|
||||
@include card([
|
||||
(0 "full" (0 0) (0 0)))
|
||||
]);
|
||||
|
||||
@include card([
|
||||
($bpMinWidth $bpMaxWidth (width height) (margWidth margHeight)
|
||||
]);
|
||||
*/
|
||||
@mixin card($cardBpColumns: []) {
|
||||
display: inline-block;
|
||||
|
||||
@if list.length($cardBpColumns) > 0 {
|
||||
@for $cardBpIndex from 1 through list.length($cardBpColumns) {
|
||||
$bp: list.nth($cardBpColumns, $cardBpIndex);
|
||||
@include breakpoint('screen', list.nth($bp, 1), list.nth($bp, 2)) {
|
||||
$size: list.nth($bp, 3);
|
||||
width: list.nth($size, 1);
|
||||
@if list.length($size) == 2 {
|
||||
height: list.nth($size, 2);
|
||||
}
|
||||
@if list.length($bp) == 4 {
|
||||
$margin: list.nth($bp, 4);
|
||||
margin-top: list.nth($margin, 1);
|
||||
margin-bottom: list.nth($margin, 1);
|
||||
@if list.length($margin) == 2 {
|
||||
margin-left: list.nth($margin, 2);
|
||||
margin-right: list.nth($margin, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*
|
||||
@include layout(column, [
|
||||
(0 "full" ((0 0) (0 0) (1 1) (0 0)))
|
||||
("m" "full" ((0 0) (0 0) (1 1) (0 0)))
|
||||
]);
|
||||
|
||||
@include layout($flex-direction, [
|
||||
|
|
@ -26,9 +26,13 @@
|
|||
@include breakpoint('screen', list.nth($bp, 1), list.nth($bp, 2)) {
|
||||
$columns: list.nth($bp, 3);
|
||||
@for $i from 1 through list.length($columns) {
|
||||
|
||||
$minmax: list.nth($columns, $i);
|
||||
$min: list.nth($minmax, 1);
|
||||
$max: list.nth($minmax, 2);
|
||||
$max: $min;
|
||||
@if list.length($minmax) == 2 {
|
||||
$max: list.nth($minmax, 2);
|
||||
}
|
||||
& > *:nth-child(#{$i}) {
|
||||
@if math.unit($min) == "" and math.unit($max) == "" {
|
||||
flex: $max $min min-content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue