Created
September 2, 2015 22:26
-
-
Save wildermuthn/c4fc877a0ed0aa05b25c to your computer and use it in GitHub Desktop.
Using generated styles with reagent and garden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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