Inheritance 忽略SASS混合参数
我正在学习SASS,并建立自己的模式库,以便做到这一点,没有什么特别之处。除了一个问题外,我的一切都很顺利。我创建了mixin:Inheritance 忽略SASS混合参数,inheritance,sass,mixins,Inheritance,Sass,Mixins,我正在学习SASS,并建立自己的模式库,以便做到这一点,没有什么特别之处。除了一个问题外,我的一切都很顺利。我创建了mixin: @mixin standout($background-colour: #F0F0F0, $top-margins: 5%, $bottom-margins: 0, $text-align-center: true) { background: $background-colour; margin-top: $top-margins; margin-bot
@mixin standout($background-colour: #F0F0F0, $top-margins: 5%, $bottom-margins: 0, $text-align-center: true) {
background: $background-colour;
margin-top: $top-margins;
margin-bottom: $bottom-margins;
@if $text-align-center == true {
text-align: center;
}
}
在main.scss中,我包括:
.Stand-Out {
@include standout(#CAAC27, 10%, 5%, true);
}
然而,编译的CSS是:
.Stand-Out {
background-color: #F0F0F0; }
我猜SASS是从其他地方继承的值
有什么想法吗
谢谢。我无法重现这个问题,一切似乎都很好。可能还有其他同名的mixin吗?也不能复制:我想知道它是否是从另一个mixin继承的?GIT在这里:我无法在您的源代码管理中找到此mixin。请尝试Andrew分支。