Fork me on GitHub
#hoplon
<
2017-01-27
>
thedavidmeister02:01:47

@chromalchemy ok cool, CSS is definitely bigger than layouts

thedavidmeister02:01:54

also, this is what i do to enable garden inline

thedavidmeister02:01:58

(defmethod hoplon.core/do! :garden
  [el _ v]
  ; Replace all the inline styles on an element with css generated by Garden.
  ; Obviously does not play nice with other methods of setting inline styles.
  (let [vs (if (sequential? v) v [v])
        css (garden.compiler/compile-style vs)]
    (.setAttribute el "style" css)))

chromalchemy16:01:49

@thedavidmeister Cool, thanks for that. Does this work with updating values dynamically with Javelin? (Maybe in the garden code?) One thing I like about using classes is that I can do this pattern to make the garden styling dynamic: (div :class (cell= {:myclass (boolean-function)}