Answer the question
In order to leave comments, you need to log in
How to make a loop that creates multiple classes in Stylus?
I need to get this:
.col_1, .col_2, .col_3, .col_4, .col_5, .col_6, .col_7, .col_8, .col_9, .col_10, .col_11, .col_12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
for x in 1..12
.col_{x}
position relative
min-height 1px
padding-left 15px
padding-right 15px
Answer the question
In order to leave comments, you need to log in
learnboost.github.io/stylus/docs/iteration.html
.column
position relative
min-height 1px
padding-left 15px
padding-right 15px
/* где .columns это родитель ваших .col-n */
.columns
for num in 1..12
.col-{num}
@extend .column
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question