less.js icon indicating copy to clipboard operation
less.js copied to clipboard

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

Open lumburr opened this issue 3 years ago • 2 comments

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

lumburr avatar May 10 '22 08:05 lumburr

@iChenLei Reason for failing test?

matthew-dean avatar Aug 20 '22 17:08 matthew-dean

@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 ?

iChenLei avatar Aug 21 '22 12:08 iChenLei