clojurescript 2026-02-25

Does clojure(script) have anything like tailwind css?

https://lyra.horse/x86css/ update: CSS is Turing-complete

How does it compare with https://github.com/roman01la/uix.css? Roman says uix.css maps css to cljs in web browser.

🤷 1

Anyway, shadow-css looks simpler. I like simple things.

the only not-so-simple part of shadow-css is the build process. otherwise it is very simple indeed

I think you can do almost everything in clojurescript. CSS in shadow-css. Replicant for HTML.

FWIW you can totally use Tailwind in a CLJS app. I wouldn't go that route anymore, personally, but I had Tailwind set up on a long-running shadow-cljs + reagent app and it worked seamlessly

girouette works for this

also consider garden

You can use Tailwind with shadow-css. In fact that's what I thought its purpose was. You can have shadow-css looking after both Tailwind and raw CSS. I see shadow-css as a life saver for reducing wordy inline Tailwind that's the same for every button down to just a keyword.

Should I use shadow-css or anything similar with or without tailwind? I have to learn CSS again. I didn't do web development for more than 10 years. I decided to specialize in clojure(script) for everything.

My advice is: don't use Tailwind or any other CSS tooling that requires a build step at first, just learn modern CSS. I think you'll find that CSS is very much improved if you last worked with it a decade ago: • https://css-tricks.com/complete-guide-css-grid-layout/ and subgrid work everywhere now, this makes layout management super predictable and uniform • Color management is https://piccalil.li/blog/a-pragmatic-guide-to-modern-css-colours-part-one/, it's very easy to contextually blend colors • The clamp() feature makes responsive typography dead easy, especially with starting points like https://utopia.fyi. • (still bleeding edge but) https://piccalil.li/blog/some-practical-examples-of-view-transitions-to-elevate-your-ui/ now let you animate transitions between pages with only HTML+CSS My hot take 🔥 on Tailwind is that it misuses HTML classes to provide a worse reimplementation of a limited subset of something HTML has always had: inline style maps. Ever since the introduction of CSS variables, inline style maps have had the ability to reference global defaults for consistency. https://increment.com/frontend/a-users-guide-to-css-variables/ have been possible for a while now in CSS variables. I find Tailwind gets in the way of what I want to do in a way that CSS rarely does.

👍 1
➕ 1

Hmm, but CSS is not a turing-complete language like clojure(script). Why do I not generate css from a clojure(script) css library?

Ask yourself whether you actually need to do that to solve a specific layout problem. If you hit limitations with plain CSS, it may be appropriate to reach for a CSS generation solution, but a lot of those existed to cover gaps in CSS that have now been addressed by CSS itself. I don't think you really learn what the limitations actually are until you try to work with the web platform defaults for a while. You might be surprised at how far you get!

Okay, I will try to go as far as possible with plain CSS. If I can't go further, then I will use clojure(script) css libraries.

I would still generate HTML from clojure(script).

💯 2
🏡 1

Hiccup + plain CSS is very effective in my experience!

the shadow-css readme explains my rationale for it. so in my view it is basically regular css. it isn't turing-complete or even dynamic at all. just a "better syntax" for CSS that solves the naming problem. plain CSS is always fine when you start if you ask me, maintaining it over time is where it gets annoying. first you just have a .button. then you want to modify it, but not all buttons. so a .button2 exists now and .button3 or whatever. or even worse you start composing stuff and now you don't know which combinations exists. essentially I was always scared to "update" any style and instead went immutable and never changed only added. that always just created an unmaintainable mess. even with stuff like BEM.

today AI might be able to deal with all those concerns but I haven't tried that in any real project

I tried vibe coding, and I concluded that there is no coding AI that learned coding deeply. They are like intern-level coders who forget the details later.

AIs can find shallow bugs quickly, but they can't find complex bugs.

They are best used as an assistant. I don't trust them to produce production code.

It's a mistake to use language models as coding AIs. It's like using language models as chess AIs.

If there is a coding AI that was trained by many rounds of human code review and can be trained on the fly for my project specifically, then I may be able to use it for production. It was fast to train chess AIs and game AIs because the feedback was automatic and never required human. Once you require human code review for feedback, training a coding AI becomes an impossibility.