6.0.2 • Published 3 years ago

postcss-values-parser v6.0.2

Weekly downloads
4,748,457
License
MPL-2.0
Repository
github
Last release
3 years ago

postcss-values-parser tests cover size

A CSS property value parser built upon PostCSS, following the same node and traversal patterns as PostCSS.

Install

Using npm:

npm install postcss-values-parser --save-dev

Please consider becoming a patron if you find this module useful.

Requirements

postcss-values-parser Node version v6.14.0+ and PostCSS v7.0.0+.

Benefits

  • 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.

Usage

Using the parser is straightforward and minimalistic:

const { parse } = require('postcss-values-parser');

const root = parse('#fff');
const node = root.first;

// → Word {
//     raws: { before: '', after: '' },
//     value: '#fff',
//     type: 'word',
//     isHex: true,
//     isColor: true,
//     isVariable: false,
//     ...
//   }

Please see the Documentation for further information on using the module.

Meta

CONTRIBUTING

LICENSE (Mozilla Public License)

postcss-color-gray@infinitebrahmanuniverse/nolb-postcss-v@everything-registry/sub-chunk-2462test-iki-mini-appsplit-css-valuestarfirevue-cli-plugin-sflegovue-cli-plugin-vusionvienna.tokens@dsbn/slate@dsbn/slatecss@csstools/postcss-image-set-function@compai/css-to-theme@compiled/cssjazzcssstylelint-scales@arshaw/postcss-custom-properties@adp-psych/stylelint-value-no-unknown-custom-properties@alfalab/postcss-custom-properties@alexlafroscia/postcss-color-mod-function@barnardos/stylelint-config-barnardos@cardstack/prettier@carhoo/widget-dealers@contagt/metismenuwebsite-dependency-graphzombiebox@evensix-compiled/css@lottiefiles/relottie-style@isnotdefined/stylelint-plugin@ericmcornelius/ease@e6-compiled/css@miksu/prettier@kaliber/build@kingscooty/postcss-color-mod-function@rdil/postcss-color-mod-function@pioluk/custom-properties-parser@prettyio/pretty@prettier-x/formatter-2021-01@sailshq/lesshint@pagecloud/postcss-custom-properties@skyscanner/stylelint-plugin-backpack@spectrum-css/component-builder@spectrum-css/component-builder-simple@spectrum-tools/postcss-add-theming-layer@spectrum-tools/postcss-rgb-mapping@spectrum-tools/stylelint-no-unused-custom-properties@spectrum-tools/theme-alignment@reme3d2y/postcss-custom-properties@reme3d2y/postcss-custom-properties-new@signal-noise/stylelint-scalesscancssnode-sass-json-functionsprettierxprettierx2prettilyposthtml-transformpostcss-color-converterpostcss-stackpostcss-svgpostcss-svg-legacypostcss-time-machinepostcss-transform-logicalpostcss-blurry-gradient-workaroundpostcss-custom-utilspostcss-custom-properties-modifiedpostcss-custom-properties-nestedpostcss-custom-properties-transformerpostcss-resolution-independencepostcss-runtimepostcss-media-functionspostcss-visitorpostcss-color-palettepostcss-custom-properties-extractorpostcss-custom-properties-fallbackpostcss-custom-properties-jimsproullpostcss-preset-env-migrate-6.7.0-to-7postcss-modules-values-replacepostcss-modules-values-replace-node6guitarrahelp-widgetlibra-tma-packlesshintlesslintkrown_login_library@xo-union/postcss-plugin-px-to-rem@zalastax/nolb-postcss-v@staxval/postcss-custom-properties@staxval/postcss-dynamic-custom-propertiescase-gg-editordetective-postcssdoloribusenimeleventy-load-cssflex-gap-polyfillfreeze-dry
6.0.2

3 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.0.0

4 years ago

4.0.0

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

3.0.0-beta.4

6 years ago

3.0.0-beta.3

6 years ago

3.0.0-beta.2

6 years ago

3.0.0-beta.1

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.2

7 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago