🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postcss-annotation-include Build Status

PostCSS plugin for annotations based including properties in other rule sets.

Using this plugin, can use inline expanding property declarations of other rules by @include.

Installation

$ npm install postcss-annotation-include

Example

var fs = require('fs')
var postcss = require('postcss')
var include = require('postcss-annotation-include')

var css = fs.readFileSync('input.css', 'utf-8')

var output = postcss(css)
  .use(include())
  .process(css)
  .css

Using this input.css:

.base-1 {
  /*
   * @base
   */
  color: red;
}

.base-2 {
  /*
   * @base
   */
  padding: 10px;
}

.foo {
  /*
   * @include .base-1, .base-2
   */
  font-size: 12px;
}

You will get:

.foo {
  /*
   * @include .base-1, .base-2
   */
  font-size: 12px;
  color: red;
  padding: 10px;
}

Options

options.css

Set your original CSS file. Default parameter is root object of PostCSS.

options.removeBase

The flag wheather remove @base rules. Default parameter is true.

License

The MIT License (MIT)

Copyright (c) 2014 Masaaki Morishita

About

PostCSS plugin for annotations based including properties in other rule sets

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages