【发布时间】:2021-05-26 11:57:51
【问题描述】:
请帮我修改mixin并创建兼容的function。
这是我的mixin,它可以接受可选参数!importanttrue或false,如果!important是true,那么输出height为
height: 16px !important; 例如:
@mixin svg-size($size, !important: true) {
svg {
height: $size foo();
width: $size foo();
}
}
Call mixin:
@include svg-size(16px, true);
Output:
svg {
height: 16px !important;
width: 16px !important;
}
我还需要为这种函数取一个合适的名称
【问题讨论】: