Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cssnano-ignore-add
Advanced tools
Ignore CSSNANO operations in lines using comments
WORK IN PROGRESS :warning:
This will be soon ship with cssnano default preset
.
In the meantime, install it using
$ yarn add cssnano-ignore-add cssnano-ignore-remove -D
and add this it in your postcss
config
// postcss.config.js
module.exports = {
plugins: [
require("cssnano-ignore-remove"),
require("cssnano"),
require("cssnano-ignore-add")
]
};
This can be just with any of
postcss
plugin, not just with cssnano. But the comment will be same
/* cssnano-ignore-line */
In order to stop cssnano doing optimization on some particular line, you simply need to add /* cssnano-ignore-line */
comment over that line.
Currently we support only for declaration statement, that mean you can add this comment over CSS declaration line not over the selector list in Rule declaration
example
// Correct example
.classname{
margin : auto;
/* cssnano-ignore-line */
color : red
}
// Wrong example
/* cssnano-ignore-line */
.classname{
margin : auto;
color : red
}
/* cssnano-ignore-line */
@media screen and (min-width: 480px) {
ul {
list-style : none;
}
}
It simple remove the next line before running the cssnano plugins and then add them at the end.
It contains two packages, one to remove the line and another to add it .
FAQs
Ignore CSSNANO operations in lines using comments
The npm package cssnano-ignore-add receives a total of 0 weekly downloads. As such, cssnano-ignore-add popularity was classified as not popular.
We found that cssnano-ignore-add 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.