0
0
mirror of https://github.com/crazy-max/diun.git synced 2024-12-22 19:38:28 +00:00
crazy-max_diun/vendor/github.com/vanng822/css
2024-12-14 22:30:21 +01:00
..
.gitignore chore: go mod vendor 2024-12-14 22:30:21 +01:00
.travis.yml chore: go mod vendor 2024-12-14 22:30:21 +01:00
block_parser.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
charset_parser.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
doc.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
import_parser.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
LICENSE chore: go mod vendor 2024-12-14 22:30:21 +01:00
parser.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
README.md chore: go mod vendor 2024-12-14 22:30:21 +01:00
rule.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
selector_parser.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
skip_rule.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
styledeclaration.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
stylerule.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
stylesheet.go chore: go mod vendor 2024-12-14 22:30:21 +01:00

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