fancl 67accdedf4 init project 2 years ago
..
.gitignore 67accdedf4 init project 2 years ago
.travis.yml 67accdedf4 init project 2 years ago
LICENSE 67accdedf4 init project 2 years ago
README.md 67accdedf4 init project 2 years ago
at_parser.go 67accdedf4 init project 2 years ago
block_parser.go 67accdedf4 init project 2 years ago
doc.go 67accdedf4 init project 2 years ago
parser.go 67accdedf4 init project 2 years ago
rule.go 67accdedf4 init project 2 years ago
selector_parser.go 67accdedf4 init project 2 years ago
skip_rule.go 67accdedf4 init project 2 years ago
styledeclaration.go 67accdedf4 init project 2 years ago
stylerule.go 67accdedf4 init project 2 years ago
stylesheet.go 67accdedf4 init project 2 years ago
value.go 67accdedf4 init project 2 years ago

README.md

css

Package css is for parsing css stylesheet.

Document

GoDoc

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.Selector.Text())
        fmt.Println(rule.Style.Styles)
    }
}