Answer the question
In order to leave comments, you need to log in
How to add class for second element via mixin?
This mixin creates a regular field with a label.
mixin field(title)
p.field
label(for!=attributes.id).field__label= title
input(id!=attributes.id class!=attributes.class value!=attributes.value).field__input
attributes
, I set certain attributes at the place where the mixin is output.+field('Дата')(class="page-footer__date-input")(id="date")(value="10.01.2018")
input
but also to label
? If I specify in the label class!=attributes.class
and then specify the name of the class through the mixin, then the same class will be applied to both the input and the label. How to get out of this situation? 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