Skip to content

Commit bd282d5

Browse files
committed
Match float parse rounding with Gecko
1 parent e60477b commit bd282d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "cssparser"
4-
version = "0.13.6"
4+
version = "0.13.7"
55
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]
66

77
description = "Rust implementation of CSS Syntax Level 3"

src/tokenizer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ fn consume_numeric<'a>(tokenizer: &mut Tokenizer<'a>) -> Token<'a> {
859859
if !tokenizer.is_eof() && tokenizer.next_byte_unchecked() == b'%' {
860860
tokenizer.advance(1);
861861
return Percentage(PercentageValue {
862-
unit_value: value as f32 / 100.,
862+
unit_value: (value / 100.) as f32,
863863
int_value: int_value,
864864
has_sign: has_sign,
865865
})

0 commit comments

Comments
 (0)