Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ianstormtaylor/rework-color-function

Implements Tab Atkins's proposed color function in CSS.
https://github.com/ianstormtaylor/rework-color-function

Last synced: 7 days ago
JSON representation

Implements Tab Atkins's proposed color function in CSS.

Awesome Lists containing this project

README

        

# rework-color-function

Implements [Tab Atkins](https://github.com/tabatkins)'s [proposed color function](http://dev.w3.org/csswg/css-color/#modifying-colors) in CSS.

## Installation

$ npm install rework-color-function

## Example

```js
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:

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

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

## License

MIT