fix regression: mixin guards compare units correctly

This commit is contained in:
Luke Page
2013-03-06 10:07:43 +00:00
parent c583acede0
commit dca16509c2
3 changed files with 19 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ tree.Dimension.prototype = {
} else if (bValue < aValue) {
return 1;
} else {
if (!b.unit.isEmpty() && a.unit.compare(b) !== 0) {
if (!b.unit.isEmpty() && a.unit.compare(b.unit) !== 0) {
return -1;
}
return 0;

View File

@@ -69,3 +69,8 @@
content: is not theme2;
content: is theme1 no quotes;
}
#tryNumberPx {
catch: all;
declare: 4;
declare: 4px;
}

View File

@@ -121,4 +121,17 @@
.stringguard("theme1");
.stringguard("theme2");
.stringguard(theme1);
}
.mixin(...) {
catch:all;
}
.mixin(@var) when (@var=4) {
declare: 4;
}
.mixin(@var) when (@var=4px) {
declare: 4px;
}
#tryNumberPx {
.mixin(4px);
}