Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
gulp-px3rem
Advanced tools
This is a gulp plugin for px2rem
CLI tool provided in px2rem
The raw stylesheet only contains @2x style, and if you
/*no*/
after the declaration/*px*/
after the declarationAttention: Dealing with SASS or LESS, only /*...*/
comment can be used, in order to have the comments persisted
Gulpfile.js:
var gulp = require('gulp');
var px2rem = require('gulp-px3rem');
gulp.task('px2rem', function() {
gulp.src('./*.css')
.pipe(px2rem())
.pipe(gulp.dest('./dest'))
});
px2rem({
baseDpr: 2, // base device pixel ratio (default: 2)
threeVersion: false, // whether to generate @1x, @2x and @3x version (default: false)
remVersion: true, // whether to generate rem version (default: true)
remUnit: 75, // rem unit value (default: 75)
remPrecision: 6 // rem precision (default: 6)
})
One raw stylesheet: test.css
.selector {
width: 150px;
height: 64px; /*px*/
font-size: 28px; /*px*/
border: 1px solid #ddd; /*no*/
}
Rem version: test.debug.css
.selector {
width: 2rem;
border: 1px solid #ddd;
}
[data-dpr="1"] .selector {
height: 32px;
font-size: 14px;
}
[data-dpr="2"] .selector {
height: 64px;
font-size: 28px;
}
[data-dpr="3"] .selector {
height: 96px;
font-size: 42px;
}
@1x version: test1x.debug.css
.selector {
width: 75px;
height: 32px;
font-size: 14px;
border: 1px solid #ddd;
}
@2x version: test2x.debug.css
.selector {
width: 150px;
height: 64px;
font-size: 28px;
border: 1px solid #ddd;
}
@3x version: test3x.debug.css
.selector {
width: 225px;
height: 96px;
font-size: 42px;
border: 1px solid #ddd;
}
/*px*/
comment).MIT
FAQs
A gulp plugin for px2rem
We found that gulp-px3rem 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.