
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
postcss-mixins
Advanced tools
PostCSS plugin for mixins.
Note, that you must set this plugin before postcss-simple-vars and postcss-nested.
@define-mixin icon $network, $color: blue {
.icon.is-$(network) {
color: $color;
@mixin-content;
}
.icon.is-$(network):hover {
color: white;
background: $color;
}
}
@mixin icon twitter {
background: url(twt.png);
}
@mixin icon youtube, red {
background: url(youtube.png);
}
.icon.is-twitter {
color: blue;
background: url(twt.png);
}
.icon.is-twitter:hover {
color: white;
background: blue;
}
.icon.is-youtube {
color: red;
background: url(youtube.png);
}
.icon.is-youtube:hover {
color: white;
background: red;
}
postcss-utilities collection is better for clearfix and other popular hacks.
For simple cases you can use postcss-define-property.
Read full docs here.
12.1.2
The postcss-extend package allows you to extend existing rulesets with additional styles, similar to the @extend directive in Sass. Unlike postcss-mixins, which focuses on reusable chunks of code, postcss-extend is more about inheriting styles from other selectors.
The postcss-nested package enables you to nest your CSS selectors in a way that follows the same visual hierarchy of your HTML. While postcss-mixins focuses on reusable code blocks, postcss-nested helps in organizing your CSS in a more readable and maintainable way.
The postcss-simple-vars package allows you to use variables in your CSS, similar to Sass variables. While postcss-mixins provides reusable code blocks, postcss-simple-vars focuses on simplifying the management of CSS values through variables.
FAQs
PostCSS plugin for mixins
The npm package postcss-mixins receives a total of 529,198 weekly downloads. As such, postcss-mixins popularity was classified as popular.
We found that postcss-mixins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.