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

additional space in css selector since 1.15.0 #314

Closed gb6881 closed 8 years ago

gb6881 commented 8 years ago

Hi, since Version 1.15.0 there is a new additional space in our test file, which i believe shouldn't belong there.

Thanks,

Georg

source less: // Main.less

/* Import all less files */

.clear {
  zoom: 1;

  &:before,
  &:after{
    content:"";
    display:table;
  }
  &:after { clear: both; }
}

.premium-small {
  left: 20px;
}

output less4j:

/* Import all less files */
.clear {
  zoom: 1;
}
.clear:before,
.clear :after {
  content: "";
  display: table;
}
.clear:after {
  clear: both;
}
.premium-small {
  left: 20px;
}

output less.js

/* Import all less files */
.clear {
  zoom: 1;
}
.clear:before,
.clear:after {
  content: "";
  display: table;
}
.clear:after {
  clear: both;
}
.premium-small {
  left: 20px;
}

less4j-output

gb6881 commented 8 years ago

seems to persist in 1.15.1:

[gbu@A-W80090N75RU Desktop]$ java -jar ~/Downloads/less4j-1.15.1.jar main.less.txt 
/* Import all less files */
.clear {
  zoom: 1;
}
.clear:before,
.clear :after {
  content: "";
  display: table;
}
.clear:after {
  clear: both;
}
.premium-small {
  left: 20px;
}
SomMeri commented 8 years ago

The issue was fixed. Since appender adding a space seem to me quite important, I will release into maven soon (at worst tomorrow).

gb6881 commented 8 years ago

great, thanks!

SomMeri commented 8 years ago

@gbu-censhare Less4j-1.15.2 was released. It should be available on maven servers within few minutes.