less / less.js

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

fix: When format the less-node, keep its context. #3726

Open lumburr opened 2 years ago

lumburr commented 2 years ago

What: fix: #3314

Why: Use % () to format less node is missing parameters.

eg: %("%d", hsla(90, 100%, 50%, 0.5)); will output "hsla(89.99999999999999, 100%, 50%, 0.5)"

How:

Add parameter toCSSOptions for toCSS(). like: https://github.com/less/less.js/blob/7491578403a5a35464772c730854c3a5169c0de7/packages/less/src/less/parse-tree.js#L29-L40 Checklist:

matthew-dean commented 1 year ago

@iChenLei Reason for failing test?

iChenLei commented 1 year ago

@matthew-dean Github actions logs expired, I don't know why actions failed, but noly node16-macos test suite failed, I think it's not big problem. @lumburr Can you re-trigger the github actions ci ?