Block comments in Pug (Jade)?
//- Just indent the comment like normal elements Just indent your comment like you do other elements. Just be careful that you have your indention correct or you may comment out more than you intended.
//- Just indent the comment like normal elements Just indent your comment like you do other elements. Just be careful that you have your indention correct or you may comment out more than you intended.
In Jade use | when start with only text wrong -> td {{anything}} br Hello correct -> td | {{anything}} br | Hello
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>
Of course, when you have two of the same tags after each other, you can simply merge them: b Hello World But, if you would have two different sibling tags and would want a space between them, you could use piping to output a space between them. For example: b Hello | <– 2 spaces … Read more
I have this same problem but in a knockoutjs context. I used the backslash like so. Previously: div(data-bind=”template: {name: ‘ingredient-template’, data: $data}”) Now: div(data-bind=”template: {\ name: ‘ingredient-template’,\ data: $data}”) Note: The backslash must be followed immediately by a newline. I’m not sure if this is the ‘official’ way, I just did it and it seems … Read more
This worked for me: style. body { background-color: {{themeColor}}; } Got it from: https://github.com/mquandalle/meteor-jade/issues/102 where the post suggests to use “dot notation”