Buckets:
32.1 GB
673,093 files
Updated 5 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| dist | 4 items | ||
| CHANGELOG.md | 81 Bytes xet | f4520e0d | |
| LICENSE.md | 6.8 kB xet | 9a6cf653 | |
| README.md | 2.54 kB xet | e0eb9b4b | |
| package.json | 2.26 kB xet | 870a98ca |
PostCSS Nested Calc
PostCSS Nested Calc lets you use nested calc() expressions following the CSS Values and Units 4 specification.
.example {
order: calc(1 + calc(2 * 2));
}
/* becomes */
.example {
order: calc(1 + (2 * 2));
order: calc(1 + calc(2 * 2));
}
Usage
Add PostCSS Nested Calc to your project:
npm install postcss @csstools/postcss-nested-calc --save-dev
Use it as a PostCSS plugin:
const postcss = require('postcss');
const postcssNestedCalc = require('@csstools/postcss-nested-calc');
postcss([
postcssNestedCalc(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
PostCSS Nested Calc runs in all Node environments, with special instructions for:
Options
preserve
The preserve option determines whether the original notation
is preserved. By default the original values are preserved.
postcssNestedCalc({ preserve: false })
.example {
order: calc(1 + calc(2 * 2));
}
/* becomes */
.example {
order: calc(1 + (2 * 2));
}
- Total size
- 32.1 GB
- Files
- 673,093
- Last updated
- Mar 19
- Pre-warmed CDN
- US EU US EU