Using `.container` as a mixin is impossible
Created by: dminkovsky
I am trying to avoid semantically polluting my markup with Bootstrap's selectors. Rather than including Bootstrap's classes in my HTML, I would rather incorporate its rulesets in my own rulesets.
For example, say I've already got this HTML:
<div class="content"></div>
I want to make div#content
a Boostrap .container
. To that end, I wish that in my LESS I could simply do:
@import "variables.less";
@import "../boostrap/less/grid.less";
.content {
.container;
}
However, this doesn't really make my .content
DIV a .container
because of the @media
queries in grid.less
that are beyond the initial .container
ruleset. They don't get included in the resulting CSS for .content
. Am I missing some way I could do this with LESS?
I've searched the issues list for this and the closest topic I found was "https://github.com/twbs/bootstrap/pull/10160". That PR doesn't seem to address this problem.