This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-03
Channels
- # adventofcode (151)
- # asami (34)
- # babashka (43)
- # beginners (111)
- # cider (2)
- # clj-kondo (6)
- # cljdoc (12)
- # clojure (140)
- # clojure-australia (10)
- # clojure-europe (14)
- # clojure-france (5)
- # clojure-gamedev (5)
- # clojure-nl (4)
- # clojure-uk (10)
- # clojurescript (20)
- # community-development (9)
- # conjure (1)
- # core-async (4)
- # cryogen (3)
- # cursive (2)
- # datomic (17)
- # emacs (9)
- # events (1)
- # fulcro (27)
- # juxt (8)
- # kaocha (2)
- # lambdaisland (14)
- # off-topic (23)
- # pathom (37)
- # pedestal (2)
- # re-frame (8)
- # reagent (8)
- # reclojure (9)
- # reitit (5)
- # reveal (34)
- # shadow-cljs (27)
- # spacemacs (10)
- # tools-deps (123)
- # vim (28)
- # xtdb (17)
Some regex fun: https://twitter.com/chrishouser/status/1334358203245752322 Can we name the captured expression in Regal?
No, not supported because JS doesn't support it. It's a proposal though so once ClojureScript uses a new enough variant of Ecmascript we can consider it 🙂
I started a small library similar to tailwindcss, but designed in a Clojure way, taking advantage of the macro system to read the name of the classes and generate them as you go. I thought about using Regal for it, but was blocked by that specific missing feature. So I using Minimallist for now.
That’s a kind-of-new way to generate css … grammar-based generation instead of config-based like tailwind where there is a garbage collector for all the generated and unused classes which are removed for production builds.
interesting, we may actually release a library in the near future for doing css-in-js style stuff, but on the backend, on top of garden
Ideally, I wish that the user of my library to be able to write down their own syntax in a easy way. I am still thinking about how to make it easy to describe.
basically you define styled component like this
(o/defstyled description :div
{:max-width "29rem !important"
:min-width "20rem"
:justify-self "center"
:align-self "center"
:grid-area "2 / 2 / 3"})
then use it in your hiccup
[description ...]
;; or
[:p {:class [description]} ...]
and it ends up as a generated class in a css file on productionI am thinking more like having classes describing elementary things like .mr-109px
which mean marge on the right with 109 pixels.
where the user can describe a grammar for the possible class names, in a convenient way
… and most importantly, how to map their parsed parts to names, bidirectionally.
I will give it some time and think.