Answer the question
In order to leave comments, you need to log in
How to pass class to pug or jade mixin?
Hello.
I want to create a mixin, but it doesn't work.
The result should be like this
svg.icon-location
use(xlink:href="#location")
svg.= class
use(xlink:href="#= icon")
+icon('icon-location', 'location')
Answer the question
In order to leave comments, you need to log in
mixin value(name)
span(class="value " + name)= name
mixin icon(icon, location)
svg(class="" + icon)
use(xlink:href="#" + location )
.header
p Text
+value('example text')
+icon('icon-location', 'location')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question