|
5fcee966
|
2018-12-03T20:55:22
|
|
Identify CSS units and variables (#1450)
Assume CSS unit is a word or `%` after a number, CSS variable is a word inside `var()`.
`%` is not recognized as a part of number, but the leading `-` is.
When using minus operator in `calc` function, we must type a space in both sides of `-`
(value like `calc(100%-5px)` is wrong), so if we met a pattern like `-[\d.]` in a CSS value
(not in selector, rule or variable), it must be the start of a negative number.
|