I've just added lightningcss (version 1.32.0) to my project and I've got some oklch colour values which get converted to lab/rgb.
I've just been scanning through the output and it seems like only some of the output lab colours have far too much precision on them.
I've come up with a minimal reproduction:
import { browserslistToTargets, transform } from "lightningcss";
console.log(
transform({
code: Buffer.from(`.element { color: oklch(0.708 0 0); }`),
targets: browserslistToTargets(["chrome 100"]),
}).code.toString(),
);
which outputs:
.element {
color: #a1a1a1;
color: lab(66.128% -.0000298023 .0000119209);
}
It seems like the 2 trailing channels should just be rounded to 0?
I've just added lightningcss (version 1.32.0) to my project and I've got some
oklchcolour values which get converted tolab/rgb.I've just been scanning through the output and it seems like only some of the output
labcolours have far too much precision on them.I've come up with a minimal reproduction:
which outputs:
It seems like the 2 trailing channels should just be rounded to 0?