Fork me on GitHub
#garden
<
2021-01-14
>
Mikko Koski11:01:06

I've done it so that I have a defclass macro that has clj and cljs variants. In CLJ (i.e. when running lein garden)

(ns my-style-namespace)

(defclass warning
  {:color :red})

;; expands to
;; #=> (def warning [".my_style_namespace_warning" {:color :red}])
And in CLJS (when referencing the style from React/Reagent component)
(ns my-style-namespace)

(defclass warning
  {:color :red})

;; expands to
;; #=> (def warning "my_style_namespace_warning")
This has been working fine for me but if I understood right you're not using CLJS but hiccup in CLJ, you need to figure out another way to decide which variant to use.