SomMeri / less4j

Less language is an extension of css and less4j compiles it into regular css. Less adds several dynamic features into css: variables, expressions, nested rules, and so on. Less was designed to be compatible with css and any correct css file is also correct less file.
145 stars 47 forks source link

Comparison of incompatible numbers should evaluate to false #302

Closed SomMeri closed 8 years ago

SomMeri commented 9 years ago

Input:

.mixin(@v1, @v2) when (@v1 > @v2) {
  guard-bigger: true;
}
.mixin(@v1, @v2) when (@v1 < @v2) {
  guard-smaller: true;
}
.mixin(@v1, @v2) when (default()) {
  guard: false;
}
#use-place {
  .mixin(10mm, 5deg);
}

Expected output:

#use-place {
  guard: false;
}

Related change: Guards should convert numbers before comparing them

SomMeri commented 9 years ago

Documentation: