Liking cljdoc? Tell your friends :D

script.css


+parser+clj


generate-cssclj

(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}"
raw docstring

generate-styleclj

(generate-style m)

creates a style string

(generate-style {:bold true}) => "bold: true;"

creates a style string

(generate-style {:bold true})
=> "bold: true;"
raw docstring

parse-cssclj

(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"}]]
raw docstring

parse-pairclj

(parse-pair text)

parses a style pair

(parse-pair "bold: true") => [:bold "true"]

parses a style pair

(parse-pair "bold: true")
=> [:bold "true"]
raw docstring

parse-ruleclj

(parse-rule rule)

helper function for parse-css

helper function for parse-css
raw docstring

parse-styleclj

(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"}
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close