0
私はmixin
をいくつかの場所で使用しています。私はパラメータとしてこのmixin
を渡すことも可能かどうかを知りたいと思います。これは私のコードサンプルです:パラメータとして@mixinを渡す
.modules-component {
ion-content {
&.math {
@include scroll-content(ocean);
scroll-content {
ion-item-group {
ion-item:nth-child(3) {
@include linear-gradient(to left, color($colors, lagoon) 15%, color($colors, ocean) 100%, color($colors, ocean) 100%);
}
}
}
}
&.english {
@include scroll-content(meadow);
scroll-content {
ion-item-group {
ion-item:nth-child(3) {
@include linear-gradient(to left, color($colors, lemon) 15%, color($colors, meadow) 100%, color($colors, meadow) 100%);
}
}
}
}
&.german {
@include scroll-content(petal);
scroll-content {
ion-item-group {
ion-item:nth-child(3) {
@include linear-gradient(to left, color($colors, lilac) 15%, color($colors, petal) 100%, color($colors, petal) 100%);
}
}
}
}
}
}
あなたはscroll-content
面積が常に同じで表示された場合は色の値が異なっている帽子以外が含まれます。上記のコードを単純化するにはどうすればよいですか?