csslib
csslib copied to clipboard
Add support for exponential notation.
Related to dart-lang/csslib#123
@devoncarew ?
Thanks for the contribution!
I don't see the css validating using the validator at https://jigsaw.w3.org/css-validator.
1 Value Error : color Unknown dimension 1e2
1 Value Error : color Unknown dimension .5e1
1 Value Error : color Unknown dimension .5e-1
1 Value Error : color Invalid RGB function )
That site claims to be validating against CSS level 3.
I do see exponential notation in the railroad grammar for numeric tokens (https://drafts.csswg.org/css-syntax-3/#typedef-number-token), and can use it in css properties when editing things in devtools. I wonder - is the validator out of date? Incorrect?
Apparently all popular validators fail to parse this. It works in both Chrome and Safari though.
https://jsfiddle.net/36r8vpas/
Hmm, @leonsenft - do you have thoughts here?