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

https://github.com/yisar/peacecss

Golang implement of postcss.
https://github.com/yisar/peacecss

Last synced: 6 months ago
JSON representation

Golang implement of postcss.

Awesome Lists containing this project

README

          

# peacecss
Postcss alternative.

### [Playground](https://yisar.github.io/peacecss/)

### Use

```go
package main

import (
"fmt"
"github.com/yisar/peacecss"
)

func main() {
parser := peacecss.NewParser()

s := []byte(".a{color:#fff;}")

ast := parser.Parse(s)

ast.Traverse(func (node *peacecss.CSSDefinition){
fmt.Printf("%v", node)

node.Selector.Selector = ".b"

fmt.Printf("%v", node)
})

mini := ast.Minisize()

fmt.Printf("%s", mini.String())

}
```