Reputation: 850
I am making a site map.
Need something like this as a result:
ul.site-map li[data-level="1"] {
margin-left: 50px;
}
ul.site-map li[data-level="2"] {
margin-left: 100px;
}
ul.site-map li[data-level="3"] {
margin-left: 150px;
}
This Stylus code doesn't work:
ul.site-map
li
for $level in (1..3)
&[data-level="{$level}"]
margin-left ($level * 50)px
How can I sort this out?
Link to codepen
Upvotes: 2
Views: 1932