pi

postcss-important

PostCSS plugin for annotations based `!important`

Showing:

Popularity

Downloads/wk

30

GitHub Stars

4

Maintenance

Last Commit

6yrs ago

Contributors

2

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

postcss-important Build Status

PostCSS plugin for annotations based !important

Installation

$ npm install postcss-important

Example

// Dependencies
var fs = require('fs')
var postcss = require('postcss')
var important = require('postcss-important')

// CSS to be processed
var css = fs.readFileSync('input.css', 'utf-8')

// Process CSS
var output = postcss()
  .use(important(css))
  .process(css)
  .css

Using this input.css:

.foo {
  /* @important */
  font-size: 12px !important;
  color: red;
}

.bar {
  /*
   * @important color, padding
   */
  color: red;
  font-size: 12px;
  padding: 10px;
}

You will get:

.foo {
  /* @important */
  font-size: 12px !important;
  color: red !important;
}

.bar {
  /*
   * @important color, padding
   */
  color: red !important;
  font-size: 12px;
  padding: 10px !important;
}

License

The MIT License (MIT)

Copyright (c) 2014 Masaaki Morishita

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial