Skip to content

Commit 4e231ea

Browse files
committed
WIP: Fix lab/lch tests
1 parent ba50ed3 commit 4e231ea

File tree

3 files changed

+50390
-4919
lines changed

3 files changed

+50390
-4919
lines changed

Diff for: src/color.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ impl ToCss for CielabColor {
466466
};
467467
dest.write_str(" ")?;
468468
match lch_coords.chroma {
469-
Some(chroma) => chroma.to_css(dest)?,
469+
Some(chroma) => chroma.max(0.).to_css(dest)?,
470470
None => dest.write_str("none")?,
471471
};
472472
dest.write_str(" ")?;
@@ -573,7 +573,7 @@ impl ToCss for OklabColor {
573573
};
574574
dest.write_str(" ")?;
575575
match lch_coords.chroma {
576-
Some(chroma) => chroma.to_css(dest)?,
576+
Some(chroma) => chroma.max(0.).to_css(dest)?,
577577
None => dest.write_str("none")?,
578578
};
579579
dest.write_str(" ")?;

0 commit comments

Comments
 (0)