【发布时间】:2021-05-14 05:57:09
【问题描述】:
我想在 SCSS 中写这样的东西:
.username {
color: red;
@something .mobile {
font-weight: bold
}
@something .desktop {
font-weight: normal
}
}
...在 CSS 中具有以下输出:
.mobile .username {
color: red;
font-weight: bold
}
.desktop .username {
color: red;
font-weight: normal;
}
我怎样才能做到这一点?
【问题讨论】:
-
它做到了!我接受了。谢谢!
标签: css sass scss-mixins