Recently I've been experimenting with Bootstrap and LESS, attempting the following:
LESS:
.class1 {
.jumbotron;
div {
.container();
color: white;
}
}
Here is the relevant part of the HTML code:
<div class="class1">
<div>
<h1>Heading</h1>
<p>Some text</p>
</div>
</div>
Unfortunately, the .container() mixin does not function properly when nested. It seems to be specifically related to Bootstrap mixins. On the other hand, if I modify it like this:
.class1 div {
.container();
color: white;
}
It works perfectly. I suspect that this behavior goes against the principles of LESS, so any advice on solving this issue would be greatly appreciated. Thank you in advance.