mirror of
https://github.com/crazy-max/diun.git
synced 2025-04-29 13:09:54 +00:00
23 lines
466 B
Markdown
23 lines
466 B
Markdown
# css
|
|
|
|
Package css is for parsing css stylesheet.
|
|
|
|
# Document
|
|
|
|
[](https://godoc.org/github.com/vanng822/css)
|
|
|
|
# example
|
|
|
|
import (
|
|
"github.com/vanng822/css"
|
|
"fmt"
|
|
)
|
|
func main() {
|
|
csstext := "td {width: 100px; height: 100px;}"
|
|
ss := css.Parse(csstext)
|
|
rules := ss.GetCSSRuleList()
|
|
for _, rule := range rules {
|
|
fmt.Println(rule.Style.SelectorText)
|
|
fmt.Println(rule.Style.Styles)
|
|
}
|
|
}
|