Skip to content

Instantly share code, notes, and snippets.

@wildermuthn
Created September 2, 2015 22:26
Show Gist options
  • Save wildermuthn/c4fc877a0ed0aa05b25c to your computer and use it in GitHub Desktop.
Save wildermuthn/c4fc877a0ed0aa05b25c to your computer and use it in GitHub Desktop.
Using generated styles with reagent and garden
(def page (make :div))
(def title (make :h1))
(def article (make :p))
(def ul (make :ul {:color "gray"}))
(select title {:color "red"})
(select [page article] {:color "green"})
(select [page ul :li] {:font-weight "bold"})
(def list-select (select [page ul]))
(list-select :li.active {:color "orange"})
(defn root-component []
[page
[title "h1"]
[article "article"]
[ul
[:li "inactive"]
[:li.active "active"]]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment