Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cssnano-ignore-add

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssnano-ignore-add

Ignore CSSNANO operations in lines using comments

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

cssnano-ignore-add

Ignore CSSNANO operations in lines using comments

Status

WORK IN PROGRESS :warning:

Getting started

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 */

How it works

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.

Packages

It contains two packages, one to remove the line and another to add it .

  • cssnano-ignore-remove
  • cssnano-ignore-add

Keywords

FAQs

Package last updated on 09 Feb 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc