
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
postcss-modules-extend-rule
Advanced tools
PostCSS plugin set for using extend at-rule with CSS Modules.

PostCSS plugin for using @extend at-rule with CSS Modules.
.myClass {
@extend .someClass from 'module';
}
This package is using PostCSS Extend Rule plugin internally - extending it's behaviour to work with CSS Modules easily.
TODO: Describe why
composesisn't enough.
yarn add --dev postcss-modules-extend-rule
This package consists of two PostCSS plugins. To use it, your setup must allow
both pre-bundling and post-bundling PostCSS processing. First, before the
CSS Modules bundling, all modules must be tranformed with
postcss-modules-extend-rule/pre plugin. Then, the final bundle must be
processed with postcss-modules-extend-rule/post.
TODO: article on why it's needed
const { pre, post } = require('postcss-modules-extend-rule');
// or
const pre = require('postcss-modules-extend-rule/pre'); // use me before bundling happens
const post = require('postcss-modules-extend-rule/post'); // use me on the final CSS bundle
Pre-bundling and post-bundling processing can be implemented in webpack environment by combining PostCSS Loader and PostCSSAssetsPlugin:
// in CSS loader chain
{
loader: 'postcss-loader',
options: {
plugins: [require('postcss-modules-extend-rule/pre')]
}
}
// in plugins
new PostCSSAssetsPlugin({
test: /\.css$/,
plugins: [require('postcss-modules-extend-rule/post')],
});
Example working setup can be fun in our test webpack.config.js.
TODO: article with details and other setups (e.g.
style-loader)
This package supports all options from PostCSS Extend Rule. Both pre and post plugins accept the same set of options.
postcssModuleExtends.pre({ onFunctionalSelector: 'warn' });
Functional selectors (e.g. %foo) are not supported yet. Contributions are very welcome!
FAQs
PostCSS plugin set for using extend at-rule with CSS Modules.
The npm package postcss-modules-extend-rule receives a total of 287 weekly downloads. As such, postcss-modules-extend-rule popularity was classified as not popular.
We found that postcss-modules-extend-rule demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.