
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
postcss-prefixwrap
Advanced tools
A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.
v0.2.1
A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.
0. Ensure all Dependencies have been resolved.
1. Install the Node module:
npm install --save-dev postcss-prefixwrap
2. Load the module in your build configuration:
var prefixwrap = require("postcss-prefixwrap");
3. Instantiate the PostCSS plugin:
// This will be a class on the container div.
var wrapSelector = ".my-custom-wrap";
// Postcss config for some workflow such as webpack.
{
postcss: [
prefixwrap(wrapSelector)
]
}
4. Add the container to your markup:
<div class="my-custom-wrap">
<!-- Your existing markup. -->
</div>
5. Your css will now be contained:
/* Before */
p {
color: red;
}
body {
font-size: 16px;
}
/* After */
.my-custom-wrap p {
color: red;
}
.my-custom-wrap {
font-size: 16px;
}
See https://travis-ci.org/dbtedman/postcss-prefixwrap for CI results, run on each commit.
Code is linted using ESLint:
npm run test:lint
Code is unit tested using MochaJS.
npm run test:unit
Based on the NPM Publishing Guide, after updating the current version, run the following command:
npm publish
FAQs
A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.
The npm package postcss-prefixwrap receives a total of 50,852 weekly downloads. As such, postcss-prefixwrap popularity was classified as popular.
We found that postcss-prefixwrap 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.