Reputation: 577
I'm currently messing around with Bootstrap and LESS, and tried to do the following:
LESS:
.class1 {
.jumbotron;
div {
.container();
color: white;
}
}
HTML (just the part that matters of course):
<div class="class1">
<div>
<h1>Heading</h1>
<p>Some text</p>
</div>
</div>
But the .container() mixin refuses to work when in a nest. Note that the text color is indeed white, which indicates the problem is only with Bootstrap mixins.
Indeed, if I do this:
.class1 div {
.container();
color: white;
}
It works like a charm.
But I'm sure LESS isn't supposed to work like that, so any help is much appreciated. Thanks in advance.
Upvotes: 0
Views: 72
Reputation: 792
.class1 div {
.container();
color: white;
}
is working, so the problem comes from your selector or something between the two selectors. Look at .jumbotron;
and edit it, so you will resolve the conflict.
Upvotes: 1