我有这个SASS代码:
.card.job.card-border-color-6:hover .button {
background: #ffdedb;
transition: background 400ms ease-in-out;
}
.card.job.card-border-color-6 .button:hover {
background: hsl(14, 100%, 53%);
color: white;
transition: background 400ms ease-in-out;
}
但我希望通过某种通配符语法使其具有通用性,如下所示:
.card.job.card-border-color-*:hover .button {
background: #ffdedb;
transition: background 400ms ease-in-out;
}
.card.job.card-border-color-* .button:hover {
background: hsl(14, 100%, 53%);
color: white;
transition: background 400ms ease-in-out;
}
然而这种语法不正确,Sass编写此代码以使其通用的正确方法是什么?