M
M
ma4t2019-02-25 11:35:02
Pug
ma4t, 2019-02-25 11:35:02

How to refer to a mixin element?

I create, for example, a mixin in a pug file

mixin block()
       .block
              img
              .text
                    .text-1
                    .text-2

Then on another page I duplicate it as
+block()
+block()
+block()
I set the right dimensions for the picture, style the text and everything.
But then, in each block, where I duplicate them, I need to make my img, that is, write my src.
And plus, in each block, change some attribute of text-1, let it be color.
What is the correct way to access these elements?
I can write modifiers for img and text-1, but HOW do I access them when I write +block()?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-02-25
@ma4t

pass parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question