【发布时间】:2019-10-05 11:26:55
【问题描述】:
我有一些混合:
@mixin flexBox( $directionVlaue: row, $justifyValue: flex-start, $alignValue: baseline ) {
display: flex;
flex-direction: $directionVlaue;
justify-content: $justifyValue;
align-items: $alignValue;
}
现在如果我使用它并传入参数,是否有可能跳过一个,所以我不必一直写所有三个参数:
.thing {
@include flexBox(row, center, center);
}
我不想在这里指定row,因为它是默认值。那么有没有可能写这样的东西:
.thing {
@include flexBox( , center, center); // leave first argument empty
}
【问题讨论】:
标签: css sass scss-mixins