parent
bf48eae722
commit
ecc7f7edeb
|
@ -7,7 +7,9 @@
|
|||
[reagent "0.6.0" :scope "provided"]
|
||||
[re-frame "0.10.3" :scope "provided"]
|
||||
[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"]
|
||||
[lein-less "RELEASE"]]
|
||||
:deploy-repositories {"releases" :clojars
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
(:require [mranderson047.garden.v1v3v3.garden.types]
|
||||
[mranderson047.garden.v1v3v3.garden.util :as util]
|
||||
[mranderson047.garden.v1v3v3.garden.core])
|
||||
(:import garden.types.CSSFunction
|
||||
garden.types.CSSAtRule))
|
||||
(:import mranderson047.garden.v1v3v3.garden.types.CSSFunction
|
||||
mranderson047.garden.v1v3v3.garden.types.CSSAtRule))
|
||||
|
||||
(defmacro defstyles
|
||||
"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\"}
|
||||
|
||||
(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.
|
||||
(defcssfn attr
|
||||
|
@ -77,7 +77,7 @@
|
|||
(css (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]]}
|
||||
|
||||
(css (attr :end-of-quote :string :inherit))
|
||||
|
@ -97,7 +97,7 @@
|
|||
(defmacro defkeyframes
|
||||
"Define a CSS @keyframes animation.
|
||||
|
||||
Ex.
|
||||
Ex.
|
||||
(defkeyframes my-animation
|
||||
[:from
|
||||
{:background \"red\"}]
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
[mranderson047.garden.v1v3v3.garden.color :as color]
|
||||
[mranderson047.garden.v1v3v3.garden.types :as t])
|
||||
#?(:clj
|
||||
(:import garden.types.CSSFunction
|
||||
garden.types.CSSAtRule)))
|
||||
(:import mranderson047.garden.v1v3v3.garden.types.CSSFunction
|
||||
mranderson047.garden.v1v3v3.garden.types.CSSAtRule)))
|
||||
|
||||
;;;; ## Stylesheet helpers
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#?(:clj
|
||||
(:refer-clojure :exclude [format]))
|
||||
#?(:clj
|
||||
(:import garden.types.CSSAtRule)))
|
||||
(:import mranderson047.garden.v1v3v3.garden.types.CSSAtRule)))
|
||||
|
||||
;; ---------------------------------------------------------------------
|
||||
;; String utilities
|
||||
|
@ -129,7 +129,7 @@
|
|||
[p s]
|
||||
(let [p (to-str p)]
|
||||
(if (= \- (first p))
|
||||
(prefix p s)
|
||||
(prefix p s)
|
||||
(prefix (str \- p) s))))
|
||||
|
||||
;; ---------------------------------------------------------------------
|
||||
|
@ -150,7 +150,7 @@
|
|||
(defn clip
|
||||
"Return a number such that n is no less than a and no more than b."
|
||||
[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))))
|
||||
|
||||
(defn average
|
||||
|
|
Loading…
Reference in New Issue