M
M
ma4t2019-02-06 16:42:33
css
ma4t, 2019-02-06 16:42:33

What is the difference between entries in Pug?

What is the difference, why is it done that way that you can write using Pug
and so div.main-block
and so div(class="main-block")

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Yarkov, 2019-02-06
@ma4t

And besides class, there are no attributes, or what?

div(class="main-block", id="sdas", data-prop="value")

D
display: block, 2019-02-06
@qork

- var className = 'block--red'
div(class="block "+className)

V
Vladimir Proskurin, 2019-02-06
@Vlad_IT

A class is usually not written like this, this is for other attributes. For a class, this is convenient if you need to substitute a variable in the class.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question