我試圖創建一個SASS兩種顏色主題有以下混入的幫助:顏色主題與上海社會科學院混入
@mixin theme($name, $bgColor, $textColor) {
.#{$name}{
blockquote {
@include borderLeft($textColor, $basicUnit/2);
}
strong {
@include doubleFrame($bgColor, $textColor, 1px);
}
.highlighted {
@include highlight($textColor);
}
.bb-custom-side.left .content-title {
color: $textColor;
}
.content > h2 {
border-top:$basicUnit/2 solid $bgColor;
}
.content {
background: $bgColor;
color: $textColor;
}
}
}
然後就是打電話
@include theme("odd", $blue, $white);
@include theme("even", $green, $black);
內我_layout.scss
但我一直得到這個錯誤,不知道我的mixin有什麼問題:
Syntax error: Invalid CSS after "...ily : "#{$name}": expected string, was "_#{$nameWeight}"";"
on line 31 of /Users/Works/html/assets/scss/_typography.scss
from line 11 of /Users/Works/html/assets/scss/main.scss
Use --trace for backtrace.
一個新手的問題...
感謝
請提供足夠的代碼的錯誤可以被複制(也有不確定的混入和變量)。 – cimmanon