10000 GitHub - tetsuo/cssparser
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tetsuo/cssparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cssparser

Parses CSS declarations from raw input.

Installation

go get github.com/tetsuo/cssparser

Usage

css := []byte(`
    color: blue;
    font-size: 12px;
`)
nodes, _ := cssparser.Parse(css)
for _, n := range nodes {
  fmt.Printf("Decl @ %+v: %s = %s\n", n.Position, n.Property, n.Value)
}

Output:

Decl @ {Start:{Line:2 Column:7} End:{Line:2 Column:19}}: color = blue
Decl @ {Start:{Line:3 Column:7} End:{Line:3 Column:23}}: font-size = 12px

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0