
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
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.2
A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.
Yes, it is released under the MIT License, See LICENSE.md.
These instructions are only for this plugin, see PostCSS website for framework information.
1. Install the plugin.
npm install --save-dev postcss-prefixwrap
2. Add to your PostCSS configuration.
// Example using Gulp.js, based on https://github.com/postcss/gulp-postcss README.md.
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var prefixwrap = require("postcss-prefixwrap"); // The require for PostCSS Prefix Wrap.
gulp.task("css", function () {
var processors = [
prefixwrap(".my-custom-wrap")
];
return gulp.src("./src/*.css")
.pipe(postcss(processors))
.pipe(gulp.dest("./dest"));
});
3. Add the container to your markup.
<div class="my-custom-wrap">
<!-- Your existing markup. -->
</div>
4. 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;
}
See our CONTRIBUTING.md guide for information regarding:
CONTRIBUTING.md
file and simplified project README.md
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 52,634 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.