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

ColorExpression.toHex incorrectly prefixes r,g,b values with "0" if they are between 15.5 and 16.0. #335

Closed grantyb closed 8 years ago

grantyb commented 8 years ago

color: darken(mix(#38C1D9, #000, 33%), 15%, relative);

produces an illegal 7-digit color value:

color: #010363d

This is caused by an error in com.github.sommeri.less4j.core.ast.ColorExpression inside toHex() which adds a prefix for values < 16 before rounding.

grantyb commented 8 years ago

This issue is resolved by PR #336. I'm not sure about the etiquette of closing this issue? Shall I wait for release 1.17.1?

SomMeri commented 8 years ago

No you do not have to way, I just forgot to close it when I was closing #336. I am closing it now and will make release today or tomorrow.