biff 2024-08-07

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

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

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

Ohh, I didn’t know we could use symbols!

1