madebysource / lesshat

Smart LESS CSS mixins library.
lesshat.com
MIT License
2.19k stars 258 forks source link

Values in mixins get unintentionally rounded with LESS#1.7.1 #113

Open MarkyMarkNo1 opened 10 years ago

MarkyMarkNo1 commented 10 years ago

Using lesshat#3.0.1 with less#1.7.0, f.e.

.test {
   .border-radius(0.5em);
}

will output something like

.test {
  -webkit-border-radius: 0.5em;
  -moz-border-radius: 0.5em;
  border-radius: 0.5em;
}

But using lesshat#3.0.1 with less#1.7.1, it will output something like

.test {
  -webkit-border-radius: 1em;
  -moz-border-radius: 1em;
  border-radius: 1em;
}

Values in mixins get unintentionally rounded in usage with LESS#1.7.1 !?

GlassGruber commented 10 years ago

Confirming this also. All my rgba values for transparency now are either 0 or 1. Also in transitions, transforms... all timing values like 0.3s are now 0. Any quick fix on this? This messed up my whole compiled code right now, guess i have to go back to previous less version...

mhoyer commented 10 years ago

Also seen this issue with lesshat#2.0.4 and lesshat#2.0.15.

MarkyMarkNo1 commented 10 years ago

Yes, same with lesshat#2.0.15: works as expected with less#1.7.0, but unintentional roundings occur when using with less#1.7.1.

petrbrzek commented 10 years ago

This is Less 1.7.1 reported bug. And this commit caused the problem.

Quick solution? Use the interpolation syntax ~"0.5" and you'd be fine!