Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/we-lib/obj-css
Parse js obj model to css
https://github.com/we-lib/obj-css
Last synced: 23 days ago
JSON representation
Parse js obj model to css
- Host: GitHub
- URL: https://github.com/we-lib/obj-css
- Owner: we-lib
- Created: 2014-09-04T16:05:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-04T16:06:53.000Z (over 10 years ago)
- Last Synced: 2024-12-04T15:05:44.026Z (25 days ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# obj-css
Parse js obj model to css
Roughly an quick inverse of [fritx/css-obj](https://github.com/fritx/css-obj)
## Usage
Source:
```js
[
[
'.hidden', {
'display': 'none'
}
],
[
'a:hover, .btn.active', {
'display': 'block',
'color': 'yellow'
}
]
]
```Parsing:
```js
var parseCss = require('obj-css')
parseCss(cssObj, function(err, css){
console.log(css)
})
```Outputs:
```css
.hidden {
display: none;
}
a:hover, .btn.active {
display: block;
color: yellow;
}
```