@csstools/postcss-syntax-descriptor-syntax-production
Use the syntax production in syntax descriptors
Last updated 3 months ago by romainmenke .
MIT-0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @csstools/postcss-syntax-descriptor-syntax-production 
SYNC missed versions from official npm registry.

PostCSS Syntax Descriptor Syntax Production PostCSS Logo

npm install @csstools/postcss-syntax-descriptor-syntax-production --save-dev

PostCSS Syntax Descriptor Syntax Production lets you use the <syntax> production in syntax descriptors following the CSS Specification.

@property --color {
	inherits: true;
	initial-value: black;
	syntax: <color>;
}

/* becomes */

@property --color {
	inherits: true;
	initial-value: black;
	syntax: "<color>";
}

Usage

Add PostCSS Syntax Descriptor Syntax Production to your project:

npm install postcss @csstools/postcss-syntax-descriptor-syntax-production --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssSyntaxDescriptorSyntaxProduction = require('@csstools/postcss-syntax-descriptor-syntax-production');

postcss([
	postcssSyntaxDescriptorSyntaxProduction(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is not preserved.

postcssSyntaxDescriptorSyntaxProduction({ preserve: true })
@property --color {
	inherits: true;
	initial-value: black;
	syntax: <color>;
}

/* becomes */

@property --color {
	inherits: true;
	initial-value: black;
	syntax: "<color>";
	syntax: <color>;
}

Current Tags

  • 2.0.0                                ...           latest (3 months ago)

3 Versions

  • 2.0.0                                ...           3 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |