Fix Garden dependencies

Fixes #138
This commit is contained in:
Daniel Compton 2018-01-31 08:56:23 +13:00
parent bf48eae722
commit ecc7f7edeb
4 changed files with 13 additions and 11 deletions

View File

@ -7,7 +7,9 @@
[reagent "0.6.0" :scope "provided"] [reagent "0.6.0" :scope "provided"]
[re-frame "0.10.3" :scope "provided"] [re-frame "0.10.3" :scope "provided"]
[binaryage/devtools "0.9.4"] [binaryage/devtools "0.9.4"]
[cljsjs/react-flip-move "2.9.17-0"]] [cljsjs/react-flip-move "2.9.17-0"]
[com.yahoo.platform.yui/yuicompressor "2.4.8" :exclusions [rhino/js]]
]
:plugins [[thomasa/mranderson "0.4.7"] :plugins [[thomasa/mranderson "0.4.7"]
[lein-less "RELEASE"]] [lein-less "RELEASE"]]
:deploy-repositories {"releases" :clojars :deploy-repositories {"releases" :clojars

View File

@ -2,8 +2,8 @@
(:require [mranderson047.garden.v1v3v3.garden.types] (:require [mranderson047.garden.v1v3v3.garden.types]
[mranderson047.garden.v1v3v3.garden.util :as util] [mranderson047.garden.v1v3v3.garden.util :as util]
[mranderson047.garden.v1v3v3.garden.core]) [mranderson047.garden.v1v3v3.garden.core])
(:import garden.types.CSSFunction (:import mranderson047.garden.v1v3v3.garden.types.CSSFunction
garden.types.CSSAtRule)) mranderson047.garden.v1v3v3.garden.types.CSSAtRule))
(defmacro defstyles (defmacro defstyles
"Convenience macro equivalent to `(def name (list styles*))`." "Convenience macro equivalent to `(def name (list styles*))`."
@ -60,7 +60,7 @@
;; => #garden.types.CSSFunction{:function \"url\", :args \"http://fonts.googleapis.com/css?family=Lato\"} ;; => #garden.types.CSSFunction{:function \"url\", :args \"http://fonts.googleapis.com/css?family=Lato\"}
(css (url \"http://fonts.googleapis.com/css?family=Lato\")) (css (url \"http://fonts.googleapis.com/css?family=Lato\"))
;; => url(http://fonts.googleapis.com/css?family=Lato) ;; => url(http://fonts.googleapis.com/css?family=Lato)
Ex. Ex.
(defcssfn attr (defcssfn attr
@ -77,7 +77,7 @@
(css (attr :vertical :length)) (css (attr :vertical :length))
;; => \"attr(vertical length)\" ;; => \"attr(vertical length)\"
(attr :end-of-quote :string :inherit) (attr :end-of-quote :string :inherit)
;; => #garden.types.CSSFunction{:function \"url\", :args [:end-of-quote [:string :inherit]]} ;; => #garden.types.CSSFunction{:function \"url\", :args [:end-of-quote [:string :inherit]]}
(css (attr :end-of-quote :string :inherit)) (css (attr :end-of-quote :string :inherit))
@ -97,7 +97,7 @@
(defmacro defkeyframes (defmacro defkeyframes
"Define a CSS @keyframes animation. "Define a CSS @keyframes animation.
Ex. Ex.
(defkeyframes my-animation (defkeyframes my-animation
[:from [:from
{:background \"red\"}] {:background \"red\"}]

View File

@ -4,8 +4,8 @@
[mranderson047.garden.v1v3v3.garden.color :as color] [mranderson047.garden.v1v3v3.garden.color :as color]
[mranderson047.garden.v1v3v3.garden.types :as t]) [mranderson047.garden.v1v3v3.garden.types :as t])
#?(:clj #?(:clj
(:import garden.types.CSSFunction (:import mranderson047.garden.v1v3v3.garden.types.CSSFunction
garden.types.CSSAtRule))) mranderson047.garden.v1v3v3.garden.types.CSSAtRule)))
;;;; ## Stylesheet helpers ;;;; ## Stylesheet helpers

View File

@ -9,7 +9,7 @@
#?(:clj #?(:clj
(:refer-clojure :exclude [format])) (:refer-clojure :exclude [format]))
#?(:clj #?(:clj
(:import garden.types.CSSAtRule))) (:import mranderson047.garden.v1v3v3.garden.types.CSSAtRule)))
;; --------------------------------------------------------------------- ;; ---------------------------------------------------------------------
;; String utilities ;; String utilities
@ -129,7 +129,7 @@
[p s] [p s]
(let [p (to-str p)] (let [p (to-str p)]
(if (= \- (first p)) (if (= \- (first p))
(prefix p s) (prefix p s)
(prefix (str \- p) s)))) (prefix (str \- p) s))))
;; --------------------------------------------------------------------- ;; ---------------------------------------------------------------------
@ -150,7 +150,7 @@
(defn clip (defn clip
"Return a number such that n is no less than a and no more than b." "Return a number such that n is no less than a and no more than b."
[a b n] [a b n]
(let [[a b] (if (<= a b) [a b] [b a])] (let [[a b] (if (<= a b) [a b] [b a])]
(max a (min b n)))) (max a (min b n))))
(defn average (defn average