postcss-currentcolor

0.0.2 • Public • Published

postcss-currentcolor Build Status

PostCSS plugin to transform (currentcolor|current-color) to currentColor

Installation

$ npm install postcss-currentcolor

Example

Input:

.foo {
  color: currentcolor;
}

.bar {
  fill: current-color;
}

Yield:

.foo {
  color: currentColor;
}

.bar {
  fill: currentColor;
}

Usage

// dependencies
var fs = require("fs")
var postcss = require("postcss")
var currentcolor = require("postcss-currentcolor")

// css to be processed
var css = fs.readFileSync("input.css", "utf8")

// process css
var output = postcss()
  .use(currentcolor())
  .process(css)
  .css

License

The MIT License (MIT)

Copyright (c) 2016 Masaaki Morishita

Package Sidebar

Install

npm i postcss-currentcolor

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • morishitter