mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
fix regression: mixin guards compare units correctly
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -69,3 +69,8 @@
|
||||
content: is not theme2;
|
||||
content: is theme1 no quotes;
|
||||
}
|
||||
#tryNumberPx {
|
||||
catch: all;
|
||||
declare: 4;
|
||||
declare: 4px;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user