.mixin > 的 LESS 语法*
我正在使用 LESS,并且正在尝试一种 mixin。
我有这个 mixin:
.mixin, .mixin > * {
font:arial;
}
我想将它用作 so 中的混合。
.my-class {
color:#000;
.mixin;
}
变成
.my-class {
color:#000;
}
.my-class, .my-class > * {
font:arial;
}
但它不起作用,可能是因为我不能像那样使用 mixin。或者我可以吗?那我该怎么写呢?在 LESS 的文档中找不到此信息。
I am using LESS and im trying for a type of mixin.
I have this mixin:
.mixin, .mixin > * {
font:arial;
}
and i want to use it as a mix in so.
.my-class {
color:#000;
.mixin;
}
becomes
.my-class {
color:#000;
}
.my-class, .my-class > * {
font:arial;
}
But it doesnt work, probobly because i cannot use mixins like that. Or can I? How do i write them then? Cannot find this information in the documentation of LESS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
怎么样:
How about:
答案是这样的。
The answer was this.