mahirshah / css-property-parser

Validate css properties and expand shorthand css properties
MIT License
60 stars 6 forks source link

feature request: property aware normalization #17

Open chriseppstein opened 6 years ago

chriseppstein commented 6 years ago

It would be really useful to have a way to normalize values for properties. This would include doing unit conversions, string case conversion, and whitespace normalization in such a way that two values that are always equivalent in the browser are the same string value.

This would probably precipitate a property aware value ast and stringifier.

soluml commented 6 years ago

As noted in the original opticss issue, postcss-colormin, or really just colormin, already handles this for the color property. While normalizing all values would be great, color is a particularly useful property to normalize with it's many different ways of defining the same thing.