
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
postcss-split-by-media
Advanced tools
Look through the test results to see how files are manipulated and split.
This plugin does not and can never know which other plugins have preceded it and which plugins need to be run after it.
Since it also leaves white space where CSS used to be it is best to use a two stage processing pipeline.
First transform your CSS to a good baseline (e.g. postcss-preset-env, postcss-nesting, ...) with this plugin last.
Then run a second stage to finalize your CSS (e.g. cssnano, sourcemaps, ...).
Use the manifest json file or the manifest callback to get the list of files from the first stage.
{
onManifest: (manifest) => {
console.log(manifest);
}
}
input :
.foo {
color: red;
}
@media (min-width: 240px) {
.foo {
color: blue;
}
}
output file a :
.foo {
color: red;
}
output file b :
@media (min-width: 240px) {
.foo {
color: blue;
}
}
manifest :
[
{
"base": "breakpoint.result.css",
"media": ""
}
{
"base": "breakpoint.result.at-media-min-width-240px.css",
"media": "(min-width: 240px)"
},
]
@media rules inside @supports@supports rules inside @mediaNested CSS (because you shouldn't be nesting CSS) Transform to normal CSS before passing CSS to this plugin.
FAQs
Split CSS by @media with PostCSS
We found that postcss-split-by-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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.