Skip to content

orus-io/elm-css-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elm CSS Parser

Elm CSS Parser is a basic CSS parser written in Elm, based on elm/parser.

import CSS.Parser

parsed = CSS.Parser.run "body { background: white }"
-- => Ok [{ properties = [("background","white ")], selectors = ["body"] }]

Result.map CSS.Parser.toString parsed
-- => Ok ("body {\n  background: white ;\n}")

Known Limitations

  • Comments are parsed but ignored

  • Comments in the component of a declaration is not supported by the parser.

    body {
      background: white /* This comment cannot be parsed */;
    }

About

A CSS Parser written in elm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages