Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
cssnano-ignore-add
Advanced tools
Ignore CSSNANO operations in lines using comments
These packages will be moved to
CSSNANO
soon once its ready to use
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.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.