JSPM

@csstools/postcss-property-rule-prelude-list

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 413935
  • Score
    100M100P100Q227816F
  • License MIT-0

Declare a list of custom properties in a single at-property rule

Package Exports

  • @csstools/postcss-property-rule-prelude-list

Readme

PostCSS Property Rule Prelude List PostCSS Logo

npm install @csstools/postcss-property-rule-prelude-list --save-dev

PostCSS Property Rule Prelude List lets you declare a list of custom properties in a single @property rule following the CSS Specification.

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

/* becomes */

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

Usage

Add PostCSS Property Rule Prelude List to your project:

npm install postcss @csstools/postcss-property-rule-prelude-list --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssPropertyRulePreludeList = require('@csstools/postcss-property-rule-prelude-list');

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