less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17k stars 3.41k forks source link

Do not calculate the aspect-ratio property value #3679

Closed yisibl closed 2 years ago

yisibl commented 2 years ago

To reproduce:

.foo {
  aspect-ratio: 144/224;
}

Current behavior:

.foo {
  aspect-ratio: 0.64285714;
}

Expected behavior: I hope to keep the output as it is.

.foo {
  aspect-ratio: 144/224;
}

Environment information:

iChenLei commented 2 years ago

@yisibl Thanks for bug report, but less(v4) already solved this problem. Check the v4 changelog -> https://github.com/less/less.js/releases/tag/v4.0.0 . If your project depend on less v3.x , please upgrade it. Thanks again.

2021-12-28 18 03 54

https://npm.runkit.com/less , you can check it via runkit

Btw, why https://lesscss.org/less-preview generate unexpected output ? Because online playground using less v3, @matthew-dean Mr.Matthew, it's time to update our less online playground.

yisibl commented 2 years ago

Thank you very much for your quick reply.

I think less-preview could show the currently used version in a clear place to avoid misunderstandings.