I know this has been covered somewhere, but what is the means to merge :class
and :css
declarations across component declarations (not override them). Thanks!
(defelem myelem [attr]
(div attr
:class [:class1]
:css {:color "red"}))
(myelem
:class [:class2]
:css {:background-color "blue")
=>
<div class="class1 class2" style="color: red; background-color: blue"/></>
Any considerations when using using :class {:class1 true }
instead of :class [:class1]
@chromalchemy newer versions of hoplon have :class/*
(def myelem (partial div :class/myelem [:class1] :css {:color "red"})) (myelem :class [:class2] :css {:background-color "blue"}))