6.0.2 • Published 4 years ago

postcss-values-parser v6.0.2

Weekly downloads
4,748,457
License
MPL-2.0
Repository
github
Last release
4 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.tokensjazzcssguitarrahelp-widgetlibra-tma-packlesshintlesslintkrown_login_library@xo-union/postcss-plugin-px-to-rem@zalastax/nolb-postcss-vfreeze-dryeleventy-load-cssflex-gap-polyfillcase-gg-editordetective-postcssdoloribusenimstylelint-scaleswebsite-dependency-graphzombieboxscancssnode-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-node6@staxval/postcss-custom-properties@staxval/postcss-dynamic-custom-properties@lcap/builder@lottiefiles/relottie-style@pioluk/custom-properties-parser@pagecloud/postcss-custom-properties@prettyio/pretty@prettier-x/formatter-2021-01@adp-psych/stylelint-value-no-unknown-custom-properties@alexlafroscia/postcss-color-mod-function@alfalab/postcss-custom-properties@cardstack/prettier@carhoo/widget-dealers@barnardos/stylelint-config-barnardos@arshaw/postcss-custom-properties@csstools/postcss-image-set-function@compai/css-to-theme@compiled/css@componlyco/core@contagt/metismenu@dsbn/slate@dsbn/slatecss@e6-compiled/css@evensix-compiled/css@ericmcornelius/ease@spectrum-tools/postcss-add-theming-layer@spectrum-tools/postcss-rgb-mapping@spectrum-tools/stylelint-no-unknown-custom-properties@spectrum-tools/stylelint-no-unused-custom-properties@spectrum-tools/stylelint-theme-alignment@spectrum-tools/theme-alignment@spectrum-css/component-builder@spectrum-css/component-builder-simple@miksu/prettier@reme3d2y/postcss-custom-properties@reme3d2y/postcss-custom-properties-new@sailshq/lesshint@salesforce-ux/stylelint-sds@kaliber/build@kaliber/stylelint-plugin@kingscooty/postcss-color-mod-function@signal-noise/stylelint-scales@isnotdefined/stylelint-plugin@skyscanner/stylelint-plugin-backpack@rdil/postcss-color-mod-function
6.0.2

4 years ago

6.0.1

4 years ago

6.0.0

5 years ago

5.0.0

5 years ago

4.0.0

5 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

3.0.0-beta.4

7 years ago

3.0.0-beta.3

7 years ago

3.0.0-beta.2

7 years ago

3.0.0-beta.1

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.8

9 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago