-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax color parser based on the current and upcoming CSS specs (#478)
This adds supports for: - fractional RGB values, e.g. "rgb(255.0, 0.0, 0.0)" - fractional percentages, e.g. "rgb(1e2%, 34.5%, .6%)" - more clamping, e.g. "hsla(0, -10%, 120%, 1.5)" - hue angle units, e.g. "turn", "rad" - case-insensitive function names, e.g. "Rgb(0, 0, 0)" This throws an error when mixing percentages and numbers, e.g. "rgb(100%, 128, 0%)". This also changes the type of the errors from `ErrorException` to `ArgumentError`.
- Loading branch information
Showing
3 changed files
with
137 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters