I still need to reproduce this (and I don't think I've faced this on the latest commit as of now). Opening this issue to track updates on this.
Some comments from Arne:
this is a particular thing to look out for, because the macro emits both clojure and clojurescript code. This means that in the style rules section you can't reference clojurescript vars because that section is only handled on the backend. We have some logic in there to allow referencing other defstyleds, but that's it. The function body otoh should be able to reference clojurescript vars, including once emitted by previous defstyled macros
I would expect this to just work, but clojurescript macroexpansion is messy and happens in multiple places/passes so it's possible that it doesn't work in some or all cases.
Some times during building cljs/c code, the cljs compiler isn't able to expand
defstyled
properly.I've noticed this behaviour to be a bit random, and mostly goes away when a JS runtime gets connected.
I still need to reproduce this (and I don't think I've faced this on the latest commit as of now). Opening this issue to track updates on this.
Some comments from Arne: