Fork me on GitHub
#biff
<
2024-08-07
o位v09:08:46

I wrote a little macro to fix the class-with-a.problem

(defmacro c [& classes]
    {:class `(str/join " " ~(mapv #(if (symbol? %) (name %) %) classes))})

馃槑 1
馃巺 1
Jacob O'Bryant21:08:33

Nice--you can also pass a vector for the :class value; I often do stuff like this:

[:div {:class '[foo
                bar
                "baz.quux"]}
 ...]

o位v21:08:46

Ohh, I didn鈥檛 know we could use symbols!

clojure-spin 1