Fork me on GitHub
#hoplon
<
2017-09-03
>
fiddlerwoaroof15:09:09

Is there any way to use :css with an element defined by defelem?

fiddlerwoaroof15:09:41

I've tried something along the lines of:

(defelem foo [{key1 :key1 key2 :key2 :as attrs} _]
  (let [leftovers (dissoc attrs :key1 key2)]
    (div leftovers ...)))
(foo :css {:width ...})
but it doesn't seem to work

fiddlerwoaroof15:09:01

The css part gets swallowed and isn't available in leftovers

flyboarder18:09:38

@fiddlerwoaroof try :style instead of :css

flyboarder19:09:46

also check the HTML output and see if the attribute is there at all