A CSS property value parser built upon PostCSS, following the same node and traversal patterns as PostCSS.
This package powers part of Prettier. Please consider becoming a sponsor if you find this package useful or are a Prettier user. https://github.com/sponsors/shellscape
Using npm:
npm install postcss-values-parser --save-dev
postcss-values-parser
Node version v6.14.0+ and PostCSS v7.0.0+.
- Leverages PostCSS and its tokenizer under the hood
- Doesn't strip characters; eg. parenthesis
- Full AST traversal
- Ability to walk the AST for every Node type
- Convenience methods to stringify Nodes
- Follows PostCSS patterns for whitespace between Nodes
- Provides convenience properties for number units, colors, etc.
Please see the Documentation for general use and further information on using the package.