在使用 scss 一段时间后,最近我一直在试用手写笔。我还没有找到用手写笔语法编写以下 scss 的方法。有没有人对此有任何解决方案。非常感谢任何想法。
@mixin attention() {
&:hover,
&:active,
&:focus {
@content;
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
@include attention() {
outline: none;
color: #09f;
}
}
最佳答案
这是可能的:https://learnboost.github.io/stylus/docs/mixins.html#block-mixins
attention() {
&:hover,
&:active,
&:focus {
{block}
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
+attention() {
outline: none;
color: #09f;
}
}
关于css - 是否可以使用手写笔混合返回选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32283614/