I am using Bootstrap with LESS and would like to 'hide' the BS classes behind my own, more semantic ones.
So for example, if I wanted to display <li>
elements as BS panels, my LESS might have something like this:
ul.main-item-list {
list-style:none;
margin:0;
padding:0;
> li {
.panel;
.panel-default;
margin:40px 0;
> .item-heading {
.panel-heading;
}
> .item-body {
.panel-body;
}
> .item-footer {
.panel-footer;
}
}
}
That applies each style rule individually.
But (obviously, when you think about it) nested selector rules are not being applied:
.panel-default > .panel-heading {
// styles normally associated with this rule are not being applied
}
Is it possible to use bootstrap classes as mixins in my own classes, in such a way that nested selector rules still work?