Domanda

Whenever I compile less files to css on my computer (Ubuntu 13.10, AMD64) I get a very different floating point result than when my colleague compiles on his machine (Mac OSX 10.6). Which is all well and good. Floating point math etc, etc. The numbers are essentially the same. Blah blah.

But it makes diffing and committing the output really annoying. I end up with hundreds of these to ignore:

.col-lg-offset-10 {
  margin-left: 83.33333333%;
  margin-left: 83.33333333333334%;
}

What can I do to avoid this problem?

È stato utile?

Soluzione

Most likely you're using different Less versions. Less (since version 1.6.2) rounds output numbers to 8 digits after the decimal point. So the solution is to sync the Less tools you and your colleague use.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top