Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
@csstools/postcss-hwb-function
Advanced tools
Readme
npm install @csstools/postcss-hwb-function --save-dev
PostCSS HWB Function lets you use the hwb()
color function in CSS, following CSS Color Module 4.
a {
color: hwb(194 0% 0%);
}
b {
color: hwb(194 0% 0% / .5);
}
/* becomes */
a {
color: rgb(0, 196, 255);
}
b {
color: rgba(0, 196, 255, 0.5);
}
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:
The preserve
option determines whether the original notation
is preserved. By default, it is not preserved.
postcssHWBFunction({ preserve: true })
a {
color: hwb(194 0% 0%);
}
b {
color: hwb(194 0% 0% / .5);
}
/* becomes */
a {
color: rgb(0, 196, 255);
color: hwb(194 0% 0%);
}
b {
color: rgba(0, 196, 255, 0.5);
color: hwb(194 0% 0% / .5);
}
FAQs
Use hwb() color functions in CSS
The npm package @csstools/postcss-hwb-function receives a total of 3,817,306 weekly downloads. As such, @csstools/postcss-hwb-function popularity was classified as popular.
We found that @csstools/postcss-hwb-function demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.