Reputation: 34627
I'm trying to make
#others li .text1:before{
content: "text1";
}...
by doing
#others li
for label in text1 text2 text3
.{label}:before
content {label}
But syntax isn't right it seems... it gives error
expected "indent", got "outdent"
The error is for content {label}
bit, because without it the class selectors (.text1:before
) prints ok
And with content '{label}'
it prints out {label}
as is.
Upvotes: 0
Views: 3252
Reputation: 43224
Stylus don't have interpolation in strings or idents for values, you could use addition to string, this would convert the ident to string:
#others li
for label in text1 text2 text3
.{label}:before
content ''+label
Upvotes: 3