postcss-annotation-extend
1.0.1 • Public • Published postcss-annotation-extend
PostCSS plugin for annotations based inheritance from other rule sets
Installation
$ npm install postcss-annotation-extend
Example
var fs = require("fs")
var postcss = require("postcss")
var extend = require("postcss-annotation-extend")
var css = fs.readFileSync("input.css", "utf8")
var output = postcss()
.use(extend(css))
.process(css)
.css
Using this input.css
:
.base-1 {
font-size: 12px;
}
.base-2 {
color: red;
}
.foo {
padding: 10px;
}
.bar {
margin: 10px;
}
You will get:
.foo,
.bar {
font-size: 12px;
}
.foo {
color: red;
}
.foo {
padding: 10px;
}
.bar {
margin: 10px;
}
License
The MIT License (MIT)
Copyright (c) 2014 Masaaki Morishita
Dependencies (1)
Dev Dependencies (2)
Package Sidebar
Install
npm i postcss-annotation-extend
Weekly Downloads