Avoid using less imports in nested scopes

Apparently, these imports of 'octicon-utf-codes.less' within mixin
definitions cause any subsequent imports of this file to become noops,
because of the way less dedupes imports. The result is that the variables
defined in that file are only available in the nested scope.

This didn't happen in older versions of less because of bugs which
have been fixed since less 2.7.

Signed-off-by: Antonio Scandurra <as-cii@github.com>
This commit is contained in:
Max Brunsfeld 2016-08-23 11:07:52 -07:00 committed by Antonio Scandurra
parent 4f4fed6cb8
commit 025de31846

View File

@ -1,3 +1,5 @@
@import "octicon-utf-codes.less";
.icon-size(@size) {
font-size: @size;
width: @size;
@ -17,7 +19,6 @@
}
.octicon(@name, @size: 16px) {
@import "octicon-utf-codes.less";
&::before {
.icon(@size);
content: @@name
@ -25,7 +26,6 @@
}
.mega-octicon(@name, @size: 32px) {
@import "octicon-utf-codes.less";
&::before {
.icon(@size);
content: @@name