0
私はこのSCSSコードがあります。SASS/SCSSコンテンツ機能
@include m(messages){
@include e(btn){
&:not([aria-expanded="true"]):hover{
background-color: rgba(66, 143, 222, 0.11);
}
&[aria-expanded="true"],
span{
background-color: $color_dark_blue;
box-shadow:0 2px 5px rgba(66, 143, 222, 0.2);
}
&[aria-expanded="true"]{
span{
color:$color_dark_blue;
}
}
}
@include e(header){
background-color:$color_dark_blue;
}
}
@include m(reminders){
@include e(btn){
&:not([aria-expanded="true"]):hover{
background-color: rgba(255, 208, 23, 0.11);
}
&[aria-expanded="true"],
span {
background-color: $color_yellow;
box-shadow:0 2px 5px rgba(255, 208, 23, 0.2);
}
&[aria-expanded="true"]{
span{
color:$color_yellow;
}
}
}
@include e(header){
background-color:$color_yellow;
}
}
を、私は同様の@include
の多くを持っている、唯一異なる色や修飾名です。 私はSASS/SCSSでこの機能を実現するためにどのように
notificator('messages', $color_dark_blue);
notificator('reminders', $color_yellow);
のような関数の何かを書きたいですか?
作品、完璧、ありがとう男! :) – Sko
うれしい私は(: –