https://github.com/dogma-io/dogma-css-parser
CSS parser and compiler
https://github.com/dogma-io/dogma-css-parser
ast compile compiler css css-parser parse parser
Last synced: 10 months ago
JSON representation
CSS parser and compiler
- Host: GitHub
- URL: https://github.com/dogma-io/dogma-css-parser
- Owner: dogma-io
- Created: 2017-09-18T19:55:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-18T20:56:11.000Z (over 8 years ago)
- Last Synced: 2025-02-16T01:09:56.889Z (10 months ago)
- Topics: ast, compile, compiler, css, css-parser, parse, parser
- Language: JavaScript
- Size: 50.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dogma-css-parser
CSS parser and compiler.
```bash
npm install dogma-css-parser
```
## Usage
### Parser
To parse a CSS string into an AST you can do the following:
```js
import {parse} from 'dogma-css-parser'
const css = '.foo {color: red;}'
const ast = parse(css)
```
The above example will set the constant **ast** to the following AST:
```json
```
### Compiler