- Operating System (or Browser): RunKit
- Node Version: 10.18.0
- postcss-values-parser Version: 3.1.1
How Do We Reproduce?
https://runkit.com/nex3/5e446258c092240013ead2f1
const pvp = require('postcss-values-parser')
pvp.parse("1.5dppx")
Expected Behavior
I expect this to parse as a Numeric.
I chose to highlight dppx here because it's a specified unit, but this will reproduce with any unit string postcss-values-parser doesn't explicitly recognize. I would more broadly expect anything matching <dimension-token> to parse as a Numeric, even if its unit isn't specified yet. This is more future-proof as the specification evolves, and more friendly to postprocessors that may define their own custom units.
Actual Behavior
It throws a CssSyntaxError.
How Do We Reproduce?
https://runkit.com/nex3/5e446258c092240013ead2f1
Expected Behavior
I expect this to parse as a
Numeric.I chose to highlight
dppxhere because it's a specified unit, but this will reproduce with any unit string postcss-values-parser doesn't explicitly recognize. I would more broadly expect anything matching<dimension-token>to parse as aNumeric, even if its unit isn't specified yet. This is more future-proof as the specification evolves, and more friendly to postprocessors that may define their own custom units.Actual Behavior
It throws a
CssSyntaxError.