S
S
SixtyNice2019-04-11 21:59:02
Pug
SixtyNice, 2019-04-11 21:59:02

Is it possible to use a parameter from a Pug mixin in a class name?

I want to do something like this, but I don't know how or if it's even possible?

mixin line(title)
     div(class="line #{title}__line")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Tolkachev, 2019-04-12
@Th0r_N13

mixin line(title)
      div(class='line line_'+title)= title

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question