Skip to content

Commit b153413

Browse files
authored
fix double hyphen when number negative and in scientific notation (#901)
1 parent c35a5fc commit b153413

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/values/number.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl ToCss for CSSNumber {
4040
cssparser::ToCss::to_css(self, &mut s)?;
4141
if number < 0.0 {
4242
dest.write_char('-')?;
43-
dest.write_str(s.trim_start_matches("-0"))
43+
dest.write_str(s.trim_start_matches("-").trim_start_matches("0"))
4444
} else {
4545
dest.write_str(s.trim_start_matches('0'))
4646
}

0 commit comments

Comments
 (0)