0.1.0 • Published 9 years ago

css-utilify v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

css-utilify Build Status

Add @base annotations to the rules.

Using with AtCSS or postcss-include.

Install

$ npm install css-utilify

Usage

CLI

$ css-utilify input-file (output-file-name)

Default output-file-name is input-file.base.css.

in PostCSS

var fs = require('fs')
var postcss = require('postcss')
var utilify = require('postcss-utilify')

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

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

Using this input.css:

.fl {
  float: left;
}

.pdt-10 {
  padding-top: 10px;
}

You will get:

.fl {
  /* @base */
  float: left;
}

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

License

The MIT License (MIT)

Copyright (c) 2015 Masaaki Morishita