
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
css-prefixer
Advanced tools
prefixing css using rework
npm install --save css-prefixer
Once the package has been installed, it may be required with this line of JavaScript:
var prefixer = require('css-prefixer');
Below is a basic example
example.css
h1#nice div.was h2 span .good {
color: red;
}
@-webkit-keyframes shake {
0%, 100% {
-webkit-transform: translateX(0);
}
}
.something.shake {
-webkit-animation-name: shake;
-moz-animation-name: shake;
-o-animation-name: shake;
animation-name: shake;
}
@media (min-width: 768px) {
#pre-truth2.media-query-style .pre-good{
font-size: 21px;
}
}
code:
var fs = require('fs');
var css = fs.readFileSync('./example.css', 'utf8')
var options= {
prefix: 'pre-'
};
var result = prefixer( css, options );
console.log(result)
result:
h1#pre-nice div.pre-was h2 span .pre-good {
color: red;
}
@-webkit-keyframes pre-shake {
0%, 100% {
-webkit-transform: translateX(0);
}
}
.pre-something.pre-shake {
-webkit-animation-name: pre-shake;
-moz-animation-name: pre-shake;
-o-animation-name: pre-shake;
animation-name: pre-shake;
}
@media (min-width: 768px) {
#pre-truth2.pre-media-query-style .pre-good {
font-size: 21px;
}
}
Type: String
Default value: ''
Prefix any class name/id selector in the target file with this prefix.
Type: [ '' ]
Default value: [ '{options.prefix}' ]
An array of strings that will ignore selector names once it starts with any of the provided strings. The provided prefix is always added to this list by default.
Type: String
Default value: null
process the prefixed class name with any of underscore.string methods
Type: Boolean
Default value: true
When true will prefix id selectors in the css.
[class=*"the-class-name"]
FAQs
prefix css rules using rework
The npm package css-prefixer receives a total of 15 weekly downloads. As such, css-prefixer popularity was classified as not popular.
We found that css-prefixer 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.