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

Nested import malfunction #308

Open SomMeri opened 8 years ago

SomMeri commented 8 years ago

File:

@import "import/chained-import-1.less"; //try also with reference
div {
  .mixin();
}

import/chained-import-1.less:

.mixin {
    aa:aa;
    //@import "chained-import-2.less";
    @import (reference) "chained-import-2.less";
}

import/chained-import-2.less:

.chained-import-2 {
  content: ~"chained-import-2";
}

compiles into:

.mixin {
  aa: aa;
}
div {
  aa: aa;
  @import "chained-import-2.less";
}

which is wrong. The @import "chained-import-2.less"; should not be in the output. It works wrong, but differently wrong, with reference being turned on/off.