CssParser.parse
You're seeing just the function
parse
, go back to CssParser module for more information.
Specs
Parses a css string to produce selectors, rules/descriptors and types. It first tries to remove css comments that might be in the css string.
Examples
iex> CssParser.parse("h4, h3 {color: blue; font-size: 20px;}")
[
%{
rules: "color: blue; font-size: 20px;",
selectors: "h4, h3",
type: "elements"
}
]
You can also parse css from a file as follows to get a string:
iex> CssParser.parse("/path/to/css/file.css")
In case the file path is invalid you'll get a relevant message such as No such file or directory
.