grid-col()
Grid 셀의 열(column) 믹스인
용도
사용법
.usage {
// 키워드: start | s | end | e | start-end | se | span
@include grid-col(se, 2 4);
}.usage {
grid-column-start: 2;
grid-column-end: 4;
}로직
참고
Last updated
Grid 셀의 열(column) 믹스인
.usage {
// 키워드: start | s | end | e | start-end | se | span
@include grid-col(se, 2 4);
}.usage {
grid-column-start: 2;
grid-column-end: 4;
}Last updated
@mixin grid-col($type, $value: null) {
@if $type == 'span' {
@include col-span($value);
}
@if $type == 'start' or $type == 's' {
@include col-start($value);
}
@if $type == 'end' or $type == 'e' {
@include col-end($value);
}
@if $type == 'start-end' or $type == 'se' {
@include col-start(nth($value, 1));
@include col-end(nth($value, 2));
}
@if not is-valid-keywords($type, span start end start-end s e se) {
grid-column: if(type-of($type) == string, unquote($type), $type);
}
}