Description
Hello,
let's say mixed.less contains classes and tag rules like this:
div {
color: #000;
}
.black {
color: #000;
}
- I import it unscoped in main.less:
@import (reference) "mixed.less";
outputs:
div {
color: #000;
}
- I import it scoped like this:
.scope {
@import (reference) "mixed.less";
}
outputs:
.scope div {
color: #000;
}
.scope .black {
color: #000;
}
I find this inconsistent. I would expect the same behaviour. So two questions:
-
Is it normal that the html tag rules it outputted ? (please have a look here too: Better explain import by reference with html tag based rules. less-docs#205)
-
Shouldn't we expect the same behaviour. I think that a scoped import should not count as an "active" call that would trigger rule's output. (except for tag based rules ?)
I have seen other import by reference issues, so it might be related. I use less 1.7.3 (grunt-contrib-less)
To better understand this, I have a widget. I use twitter bootstrap as a mixin library, and it must be scoped to avoid conflict if another website use bootstrap where the widget is inserted.
thx : )