lessphp 中的多嵌套、多块 mixin
同时将一些代码从经典的less代码转换为lessphp;我从经典的 less css 中发现的一个不兼容性是,不支持嵌套级别 > 的多块混合。 2. 经典的 less 似乎完全支持包含许多嵌套块的 mixin。
这是故意的吗?仅支持混合中的两个嵌套级别?
示例:
@some_mixin{
height: 22px;
ul{
height: 20px;
li{
height: 10px;
}
}
}
上面 lessphp 发生的情况是第三个嵌套级别;其中包含 li 标签的 CSS 代码被完全忽略!
While transforming some code to lessphp from the classic less code; an incompatibility I discovered from the classic less css is that there is no support for multi-block mixins with nesting levels > 2. The classic less seems to be fully in support of mixins having many nested blocks in them.
Is this intentional - the support for just two nesting levels inside mixings?
Example:
@some_mixin{
height: 22px;
ul{
height: 20px;
li{
height: 10px;
}
}
}
what happens above with lessphp is that the third nesting level; which contains css code for the li tag is totally ignored!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有这个问题,你使用的是最新版本的 lessphp 吗?在这里获取:https://github.com/leafo/lessphp
I don't have this issue, are you using latest version of lessphp ? get it here : https://github.com/leafo/lessphp