@csstools/postcss-container-rule-prelude-list
Declare a list of container queries in a single at-container rule
Last updated 10 days ago by romainmenke .
MIT-0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @csstools/postcss-container-rule-prelude-list 
SYNC missed versions from official npm registry.

PostCSS Container Rule Prelude List PostCSS Logo

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

PostCSS Container Rule Prelude List lets you declare a list of container queries in a single @container rule following the CSS Conditional 5 Specification.

@container card (inline-size > 30em), style(--responsive: true) {
	a {
		color: red;
	}
}

/* becomes */

@container card (inline-size > 30em) {
	a {
		color: red;
	}
}
@container style(--responsive: true) {
	a {
		color: red;
	}
}

Usage

Add PostCSS Container Rule Prelude List to your project:

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

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssContainerRulePreludeList = require('@csstools/postcss-container-rule-prelude-list');

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

Options

preserve

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

postcssContainerRulePreludeList({ preserve: true })
@container card (inline-size > 30em), style(--responsive: true) {
	a {
		color: red;
	}
}

/* becomes */

@container card (inline-size > 30em) {
	a {
		color: red;
	}
}
@container style(--responsive: true) {
	a {
		color: red;
	}
}
@container card (inline-size > 30em), style(--responsive: true) {
	a {
		color: red;
	}
}

Current Tags

  • 1.0.5                                ...           latest (10 days ago)

6 Versions

  • 1.0.5                                ...           10 days ago
  • 1.0.4                                ...           2 months ago
  • 1.0.3                                ...           2 months ago
  • 1.0.2                                ...           2 months ago
  • 1.0.1                                ...           6 months ago
  • 1.0.0                                ...           6 months ago
Downloads
Total 6
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 0
Last Month 1
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE