Fork me on GitHub
#shadow-cljs
<
2023-09-27
>
Casey10:09:46

Using shadow-css, is it possible to do things one would in TW do in tailwind.config.js? Namely: redefine colors, default spacing sizes etc? I see that those are defined in clj and edn files, can we get at them or override them?

thheller10:09:34

you do that in the build step

thheller10:09:51

all the build step does is read in the defaults, but you can just replace them

thheller10:09:10

just look at the default build state. e.g. (tap> (shadow.css.build/start)) and look at in inspect http://localhost:9630/inspect

thheller10:09:24

it is just a map, so just modify it however you need in the build step

Casey10:09:32

brilliant thanks!

thheller10:09:40

note that start already generates all the aliases, you can just call init and do the steps yourself. so if you want to adjust spacing do that before calling generate-spacing-aliases for example

nivekuil21:09:30

how do you properly type hint .. forms?

(.addChild ^js (.-stage app) sprite) ;; ok
(.. app -stage  (addChild sprite)) ;; warning cannot infer type

Dustin Getz22:09:51

if electric project make sure to test in a clojure context because electric compiler still has a few remaining bugs related to propagating the type hints

nivekuil22:09:58

I don't remember running into this outside of electric so thanks, it's probably your fault 🙂

🙂 1