justify-content()
justify-content 믹스인
용도
사용법
.usage {
@include justify-content(end, flex);
@include justify-content(between);
}.usage {
justify-content: flex-end;
justify-content: space-between;
}로직
참고
Last updated
justify-content 믹스인
.usage {
@include justify-content(end, flex);
@include justify-content(between);
}.usage {
justify-content: flex-end;
justify-content: space-between;
}Last updated
@mixin justify-content($value, $mode: grid) {
@if $value == 'start' {
justify-content: if($mode == grid, start, flex-start);
}
@if $value == 'end' {
justify-content: if($mode == grid, end, flex-end);
}
@if $value == 'center' {
justify-content: center;
}
@if $value == 'left' {
justify-content: left;
}
@if $value == 'right' {
justify-content: right;
}
@if $value == 'normal' {
justify-content: normal;
}
@if $value == 'between' {
justify-content: space-between;
}
@if $value == 'around' {
justify-content: space-around;
}
@if $value == 'evenly' {
justify-content: space-evenly;
}
@if $value == 'stretch' {
justify-content: stretch;
}
@if $value == 'safe' {
justify-content: safe center;
}
@if $value == 'unsafe' {
justify-content: unsafe center;
}
@if $value == 'inherit' {
justify-content: inherit;
}
@if $value == 'initial' {
justify-content: initial;
}
@if $value == 'unset' {
justify-content: unset;
}
}