I'm currently starting to explore Bootstrap in combination with LESS to get a new site up and running quickly in Umbraco.
As I want to avoid those terrible bootstrap class names on my HTML markup, I'm trying to semanticize (sp?) it a little bit.
So I want to have a panel. First, here is my markup like I want it to be on the end:
<div class="newsItem">
<div class="newsHeader">
Panel Title
</div>
<div class="newsBody">
Panel content
</div>
<div class="newsFooter">Panel footer</div>
</div>
And here is a working markup with bootstrap class names:
<div class="panel panel-primary">
<div class="panel-heading">
Panel Title
</div>
<div class="panel-body">
Panel content
</div>
<div class="panel-footer small">Panel footer</div>
</div>
Here is my LESS file which gets mixed with the bootstrap less files:
@import "boostrap.less"
.newsItem{
.panel;
.panel-primary;
}
.newsHeader{
.panel-heading;
}
.newsBody{
.panel-body;
}
.newsFooter{
.panel-footer;
.small
}
I figured this should work, but it seems it doesn't. Maybe I'm not getting how LESS works (total LESS n00b) Here is the rendered output:
Can anyone tell me why the left panel (that's the LESSed one) doesn't look like the right one?
I can go without this, but I'd like to understand why this isn't working.
Help would be nice.