Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/semigradsky/css-creator

JS library for dynamically creating CSS on page.
https://github.com/semigradsky/css-creator

Last synced: 19 days ago
JSON representation

JS library for dynamically creating CSS on page.

Awesome Lists containing this project

README

        

css-creator
===========

JS library for dynamically creating CSS on page.

## Installation

```
$ bower install css-creator
```

## Supports

Internet Explorer 8+

## Usage

```
var globalStyles = new CSSCreator();
...
globalStyles.addRules([
['h2',
['color', 'red'],
['background-color', 'green', true] // 'true' for !important rules
],
['.myClass',
['background-color', 'yellow']
]
]);
...
globalStyles.addToPage();
```

For more examples see example.html file.

# License

Code is released under [the MIT license](LICENSE).

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/Semigradsky/css-creator/trend.png)](https://bitdeli.com/free "Bitdeli Badge")