Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
postcss-unwrap-at-media
Advanced tools
PostCSS plugin to unwrap @media rules to make styles IE8 (and older) friendly.
PostCSS plugin to unwrap @media rules to make styles IE8 (and older) friendly.
/* Input example */
.block {
width: 100%;
}
@media (min-width: 720px) {
.block {
float: left;
width: 25%;
}
}
/* Output example */
.block {
width: 100%;
}
.block {
float: left;
width: 25%;
}
Basic usage:
postcss([ require('postcss-unwrap-at-media') ])
Here is an example of Gulpfile which create two versions of styles:
var gulp = require('gulp');
var less = require('gulp-less');
var postcss = require('gulp-postcss');
var rename = require('gulp-rename');
var unwrapAtMedia = require('postcss-unwrap-at-media');
gulp.task('default', function () {
return gulp.src('./src/**/*.less')
.pipe(less())
.pipe(gulp.dest('./dist/'))
.pipe(postcss([ unwrapAtMedia ]))
.pipe(rename({ suffix: '.ie8' }))
.pipe(gulp.dest('./dist/'));
});
See PostCSS docs for examples for your environment.
You can provide a list of strings or functions to match unwanted @-rules.
postcss([ unwrapAtMedia({ disallow: 'print' })])
postcss([ unwrapAtMedia({ disallow: ['print', 'screen'] })])
postcss([ unwrapAtMedia({ disallow: [
'print',
atRule => /min-width: 720px/.test(atRule.params)
] })])
FAQs
PostCSS plugin to unwrap @media rules to make styles IE8 (and older) friendly.
The npm package postcss-unwrap-at-media receives a total of 11 weekly downloads. As such, postcss-unwrap-at-media popularity was classified as not popular.
We found that postcss-unwrap-at-media 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
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.