in jade one can write:
div.container
and it compiles into:
<div class="container"></div>
But what if you have several classes like:
<div class="span 4"><div>
I have written it like this:
div(class="span 4")
But I am thinking: Is there not a better way of doing it in jade?
From the documentation:
how about some classes?
div.user-details
renders
<div class="user-details"></div>
multiple classes? and an id? sure:
div#foo.bar.baz
renders
<div id="foo" class="bar baz"></div>
The following format
div#MyBox.span12.blueButton.moveLeft
will create
<div id="MyBox" class="span12 blueButton moveLeft"></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With