less.js
less.js copied to clipboard
fix: When format the less-node, keep its context.
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:
- [x] Documentation
- [x] Added/updated unit tests
- [x] Code complete
@iChenLei Reason for failing test?
@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 ?