A
A
andreyka_g2015-04-20 15:54:41
HTML
andreyka_g, 2015-04-20 15:54:41

How to add class to extend block in jade?

Hello! I have 2 pages - parent.jade:

div.about
  block about

And child.jade:
extends parent
block about

How can I add a class to the about block in child.jade?
The output html file should look like this:
<div class="about about--red"></div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
frontender, 2015-04-20
@frontender

it won't work that way.
It is necessary to place div.about in parent.jade in block about, then in child.jade you can write:

block about
  div.about.about--red

S
Sergeyj, 2015-04-20
@sayber

I didn’t quite understand, what does jade and classes have to do with it?

.about.about--red
# <div class="about about--red"></div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question