Fork me on GitHub
#untangled
<
2017-05-26
>
claudiu10:05:18

@tony.kay awesome. Works now, But having a bit of trouble with getting the css in advanced mode.

claudiu10:05:03

(defui ^:once Root
  static css/CSS
  (css [this] [[(css/local-kw Root :class1) {:color 'blue}]]) 

  Object
  (render [this]
    (dom/div nil
      (dom/p nil "text")
      (dom/style nil (g/css (css/css Root))))))

claudiu10:05:45

tried other approaches but I keep getting No protocol method CSS.css defined for type function

claudiu10:05:42

to much of a beginner to have any chance at figuring out a fix, for these kinds of problems unfortunately

tony.kay15:05:47

There is a get-css function. Server side needs you to use it.

claudiu15:05:29

@tony.kay don't understand :(

claudiu15:05:16

On dev it works, in advanced mode css/css Root gives me that error. Upsert-css also :(

claudiu15:05:46

Only testing with js build now.

claudiu15:05:04

Think it was happening for 1.0.1 also

tony.kay16:05:49

I ran the cookbook recipe against 1.0.2 with updated om version alpha48 in advanced mode and it worked. Look ar the source of that example?

tony.kay16:05:31

@claudiu I just pushed an update to untangled cookbook with my changes there.

tony.kay16:05:07

the project file has the version of deps I used to get it to work. Running lein cljsbuild once release followed by

cd resources/public
open release.html
(open command assumes you have a mac)

tony.kay16:05:17

though I just noticed there is a defrecord in there, and that should not be done anymore. only works on the server

tony.kay16:05:54

and sorry, the method is named call-css.

tony.kay16:05:06

it is what you should use to call the css method on a component

tony.kay16:05:19

ooops…hold on. The push didn’t go

tony.kay16:05:20

it’s pushed now

tony.kay16:05:18

argh…wtf…it lost a file

tony.kay16:05:17

ok, should work now