Good stuff!
I'm using it in my hobby apps while I continue to cut my teeth on Clojure's web development toolkit.
I'll definitely communicate any problems/improvements I spot as I try to scratch my own itch.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/xbFU2prTxlY/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/xbFU2prTxlY/unsubscribe.
Nobel Clojurians,I am pleased to announce the alpha version of Garden, a new library for writing CSS in Clojure.The project weds the best ideas from Hiccup, gaka, and cssgen and aims to provide a clean and conventional way to author stylesheets without being too simple or too complex.Currently the list of notable features include:
- Nestable rules
- Nestable declarations (this my change)
- A builtin set of tools for working with CSS unit values
- Convenient multiple selector syntax (IE. h1, h2, h3 { ... })
- Output formatting options
What's planned for the near future:
- The ability to use Clojure meta as a media query
- A builtin set of tools for working with CSS color values
- & selector syntax for nested rules
For those of you who are interested in this sort of thing, please have a look at the project's repository. There is still quite a bit of ground to do cover and any help/criticism/contribution would be greatly appreciated.Please feel free to offer suggestions, ask questions, open issues, or send pull requests. I would love nothing more than to see this library succeed where other's have not.Truly,Joel Holdbrooks (aka noprompt)
(defn make-columns
"Creates a range of column sizes."
[width columns gutter]
(let [rng (map #(px %) (range 0 width columns))]
(doall (interpose (px gutter) rng))))
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/xbFU2prTxlY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
;; hard to see nesting [:footer {:color "red" :background-color "blue"} [:a {:color "green"}]] ;; much easier (:footer {:color "red" :background-color "blue"} [:a {:color "green"}])
(defmacro rule [& body] `[~@body]) (def footer (rule :footer {:color "red" :background-color "blue"} (rule :a {:color "green"})))
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
(defrule a :a) (defrule footer :footer) (footer {:color "red" :background-color "blue"} (a {:color "green"}))
;; These forms are all semantically equivalent. (footer {:color "red" :background-color "blue"} (a {:color "green"}))
[:footer {:color "red" :background-color "blue"}
(a {:color "green"})] (footer {:color "red"
:background-color "blue"} [:a {:color "green"}])
;; This works too. (defrule h1 :h1) (defrule hover "&:hover") (footer (h1 {:font-weight "normal"} (hover {:font-weight "bold"})) (a {:text-decoration "none"} (hover {:text-decoration "underline"})))
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/xbFU2prTxlY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
(def clearfix [:& [:&:after {:clear "both"}] [:&:before :&:after {:display "table" :content "''"}]])
[:.some-container-with-floats clearfix]
The beautiful thing about programming stylesheets in Clojure is that we can come up with whatever abstractions/techniques we like without being tied down by syntax. There's a lot of potential there for some interesting ideas.
Some people are definitely looking for this. If you come up with something, even a simple gist, please share it. I'm still loading/compiling stylesheets manually. :P
(def home-style {:css (css garden-code) :path (format "/css/home-%s.css" (md5 compiled-css)) :route (GET path [] (valid-request-with compiled-css))})
Oh, I don't know if you saw this gist but there's also some interest in ideas surrounding grid systems.