
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.
A PostCSS plugin which prepends a selector to CSS styles to constrain their effect on parent elements in a page.
These instructions are only for this plugin. See the PostCSS website for framework information.
Using NPM
npm install postcss-prefixwrap --save-dev --save-exact
Add to your PostCSS configuration.
const Gulp = require("gulp");
const PostCSS = require("gulp-postcss");
const PrefixWrap = require("postcss-prefixwrap");
Gulp.task("css", () =>
Gulp.src("./src/*.css")
.pipe(PostCSS([PrefixWrap(".my-custom-wrap")]))
.pipe(Gulp.dest("./dest"))
);
Add the container to your markup.
<div class="my-custom-wrap"><!-- Your existing markup. --></div>
View your CSS, now prefix-wrapped.
Before
p {
color: red;
}
body {
font-size: 16px;
}
After
.my-custom-wrap p {
color: red;
}
.my-custom-wrap {
font-size: 16px;
}
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.
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.