(generate-css v)creates a stylesheet
(generate-css [[:node {:bold true :color "black"}] [:h1 {:align :left}]]) => "node {\n bold: true;\n color: black;\n}\nh1 {\n align: left;\n}"
creates a stylesheet
(generate-css [[:node {:bold true
:color "black"}]
[:h1 {:align :left}]])
=> "node {\n bold: true;\n color: black;\n}\nh1 {\n align: left;\n}"(generate-style m)creates a style string
(generate-style {:bold true}) => "bold: true;"
creates a style string
(generate-style {:bold true})
=> "bold: true;"(parse-css s)reads a stylesheet entry from a string
(parse-css "node {\n bold: true;\n color: black;\n}\nh1 {\n align: left;\n}") => [[:node {:bold "true", :color "black"}] [:h1 {:align "left"}]]
reads a stylesheet entry from a string
(parse-css "node {\n bold: true;\n color: black;\n}\nh1 {\n align: left;\n}")
=> [[:node {:bold "true", :color "black"}]
[:h1 {:align "left"}]](parse-pair text)parses a style pair
(parse-pair "bold: true") => [:bold "true"]
parses a style pair (parse-pair "bold: true") => [:bold "true"]
(parse-rule rule)helper function for parse-css
helper function for parse-css
(parse-style s)reads style map from string
(parse-style "bold: true;") => {:bold "true"}
reads style map from string
(parse-style "bold: true;")
=> {:bold "true"}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |