Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browsers support a color like `hsl(120.152, 100%, 75%)` but this library would incorrectly parse the hue and fallback to black. Changes parsing the hue as an integer to parsing as a number. [CSS Color Module Level 3 4.2.4](https://www.w3.org/TR/css-color-3/#hsl-color) suggests that the hue should be a number (and not strictly an integer): > Hue is represented as an angle of the color circle (i.e. the rainbow represented in a circle). This angle is so typically measured in degrees that the unit is implicit in CSS; syntactically, only a \<number\> is given. CSS Color Module Level 4 is more explicit that hue [can be a number](https://www.w3.org/TR/css-color/#typedef-hue). This PR also comments out the `parse_integer` and `parse_list_integer` functions (and relevant tests) from `src/stream.rs` because leaving them in the code produced these warnings during build: ``` warning: methods `parse_integer` and `parse_list_integer` are never used --> src/stream.rs:417:12 | 109 | impl<'a> Stream<'a> { | ------------------- methods in this implementation ... 417 | pub fn parse_integer(&mut self) -> Result<i32, Error> { | ^^^^^^^^^^^^^ ... 447 | pub fn parse_list_integer(&mut self) -> Result<i32, Error> { | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default ``` Happy to uncomment or remove them completely if that's preferred. Related to vercel/satori#602
- Loading branch information