my()
마진(Margin) Y축 단축 믹스인
용도
사용법
.usage {
@include my(inherit);
}.usage {
margin-top: inherit;
margin-bottom: inherit;
} Y축 속성의 개별 값을 설정할 경우
로직
참고
Last updated
마진(Margin) Y축 단축 믹스인
.usage {
@include my(inherit);
}.usage {
margin-top: inherit;
margin-bottom: inherit;
}Last updated
.usage {
@include my(5% 10%);
}.usage {
margin-top: 10%;
margin-bottom: 5%;
}@mixin my($value) {
$value_length: length($value);
@if $value_length == 1 {
@include m(t $value b $value);
}
@if $value_length == 2 {
@include m(t first($value) b last($value));
}
}