我试图使用循环直通像这样的项目清单时提供的计数器: colors = red blue orange green yellow
li
for color, i in colors
&:nth-of-type({i}n)
background-color: color
这个例子没有工作,但预期输出I寻找的是: li:nth-of-type(1n) {
我正在尝试使用最新版本获取stylus.js,其中包含所有功能的1个文件。 我克隆了git的回购https://github.com/stylus/stylus就跑使stylus.js aaas-iMac:stylus aaa$ make stylus.js
make: *** No rule to make target `stylus.js'. Stop.
但我得到这个错误,没有规则。我
在声明中,如何以编程方式获取另一个声明中元素的属性的值? 例如,采取如下: .header {
height: 50px
}
.footer {
margin-top: // TODO a method for retrieving ".header" height should go here
}
是否有获得,例如一些方法,.header的的高度与.footer的
我的目标是通过数组创建一组mixin。 我的想法是申请代码如下: f_colors = (f1 f2 f3 f4 f5)
for $i in 0..length(f_colors)
v = f_colors[$i]
num = $i+1
f{num}cl()
color v
f{num}bg()
background-color