Answer the question
In order to leave comments, you need to log in
How to implement a dynamic class through a mixin?
I know mixins.
I'm trying to dynamically generate the
Input class for it to work:
var items = [
{bg:'blue},
{bg:'yellow'},
{bg:'red'}
]
each item in items
+item(item)
mixin item(item)
.inform-items__item.inform-items__item_bg_${item.bg}
div(class=`inform-items__item inform-items__item_bg_${item.bg}`)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question