Buckets:
32.1 GB
673,093 files
Updated 5 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| dist | 6 items | ||
| CHANGELOG.md | 199 Bytes xet | f1e83518 | |
| INSTALL.md | 3.75 kB xet | 52beb49d | |
| LICENSE.md | 6.8 kB xet | 9a6cf653 | |
| README.md | 2.63 kB xet | ff0cc829 | |
| package.json | 2.12 kB xet | 9bfd6ae4 |
PostCSS HWB Function
PostCSS HWB Function lets you use hwb color functions in
CSS, following the CSS Color specification.
a {
color: hwb(194 0% 0%);
color: hwb(194 0% 0% / .5);
}
/* becomes */
a {
color: rgb(0, 195, 255);
color: rgba(0, 195, 255, .5);
}
Usage
Add PostCSS HWB Function to your project:
npm install postcss @csstools/postcss-hwb-function --save-dev
Use it as a PostCSS plugin:
const postcss = require('postcss');
const postcssHWBFunction = require('@csstools/postcss-hwb-function');
postcss([
postcssHWBFunction(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
PostCSS HWB Function runs in all Node environments, with special instructions for:
Options
preserve
The preserve option determines whether the original functional color notation
is preserved. By default, it is not preserved.
postcssHWBFunction({ preserve: true })
a {
color: hwb(194 0% 0%);
color: hwb(194 0% 0% / .5);
}
/* becomes */
a {
color: rgb(0, 195, 255);
color: hwb(194 0% 0%);
color: rgba(0, 195, 255, .5);
color: hwb(194 0% 0% / .5);
}
- Total size
- 32.1 GB
- Files
- 673,093
- Last updated
- Mar 19
- Pre-warmed CDN
- US EU US EU