scss で、コントラストの変更 (本体に変更コントラスト クラスを追加) をクリックして色を変更しようとしています。
私の静的な色は次のようになります:
$primary-color-blue: #2aace2 ;
$mid-blue-color: #2695d2 ;
$ダークブルーカラー: #124b62 ;
コントラストの変更時:
$primary-color-blue: #177eab ;
$mid-blue-color: #1c6f9b ;
$ダークブルーカラー: #124b62 ;
sassのようなものでなければなりません
if(change-contrast) {
// console.log (get High Constrast Colors)
}
else {
// console.log (Static Colors)
}
以下のようにしようとしていますが、以下のようにする場合は、すべてのクラスに追加する必要があります。
@mixin branding {
@each $brand in $brand_clr {
&.#{nth($brand,1)} {
$primary-color-blue: #177eab;
@content;
}
}
}
test {
background: $primary-color-blue;
@include branding {
background: $primary-color-blue;
}
}
これについてあなたの助けに感謝します!!
ありがとう