Skip to content

ianstormtaylor/rework-color-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rework-color-function

Implements Tab Atkins's proposed color function in CSS.

Installation

$ npm install rework-color-function

Example

var color = require('rework-color-function');

rework(css)
  .use(color)
  .toString();

API

You can use the color() function in your CSS to modify colors on the fly just like Tab's spec explains:

h2 {
  background-color: color(red hue(+ 29));
}

p {
  color: color(var(green) tint(10%));
}

License

MIT

About

Implements Tab Atkins's proposed color function in CSS.

Resources

Stars

Watchers

Forks

Packages

No packages published