Kelly
Kelly

Reputation: 7183

Override Style in Jade?

I am trying to override a bootstrap class's padding in jade like so:

a.navbar-brand(href='#', style={padding:'0px'})

But the resulting HTML ends up like so:

<a href="#" style="[object Object]" class="navbar-brand">

Looking at the docs they have an example under "Style Attributes" that is almost identical, so I'm not sure why this doesn't work. http://jade-lang.com/reference/attributes/

Upvotes: 2

Views: 434

Answers (1)

Peter Lyons
Peter Lyons

Reputation: 146084

Check your version of jade. With 1.4, I get your "[object Object]" output, but with 1.8 I get the desired CSS. Not sure exactly when this feature appears but you should be OK if you use the current latest version.

Upvotes: 2

Related Questions