Fork me on GitHub
#clojurescript
<
2021-07-19
>
borkdude11:07:17

Since when does the above "just" work? It seems to work with the newest CLJS but not with an older one.

p-himik12:07:52

Seems like it started working in 1.10.741.

Adam Krivka14:07:50

Can someone ELI5 how to use Tailwind CSS (the newest version) with ClojureScript and Reagent? I found some outdated GitHub repos and am wondering if there’s a simpler way.

jkxyz16:07:44

You can use it just as you would with JavaScript, adding the tailwind classes to elements in your UI. [:div {:class [“w-6” “mt-2”]}] For purging/JIT you need to specify that it should look at cljs files to find the used classes.

Adam Krivka22:07:52

Is there an example GitHub repo of this? I’m not sure if I’m able to set up the purging/JIT. Also need to customize the classes for different font stylings etc.

jkxyz05:07:33

There may be some examples specific to ClojureScript out there, but the Tailwind documentation is great and it applies the same to using it with ClojureScript

Adam Krivka08:07:59

I have found https://github.com/fnumatic/reframe-starter and https://github.com/teknql/shadow-cljs-tailwind-jit. However, I still couldn’t get dynamic classes to compile (e.g. “h-[720px]“).

jkxyz08:07:45

I haven’t used the new JIT features yet, sorry. But I would start by following the Tailwind documentation and installing Tailwind with npm, following the standard configuration guide

jkxyz08:07:21

It should all apply exactly the same to ClojureScript except that your purge paths will need to point to your .cljs files

dnolen15:07:46

1.10.879 released - there will be more detailed notes later - but it's really a bug fix release, the require macros feature has been backed out - it's too problematic

🙌 10
awesome 4
❤️ 6