This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-09
Channels
- # announcements (5)
- # aws (5)
- # babashka (7)
- # beginners (152)
- # cider (10)
- # clj-kondo (30)
- # clj-on-windows (1)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (94)
- # clojure-australia (4)
- # clojure-europe (43)
- # clojure-nl (2)
- # clojure-uk (11)
- # clojurescript (16)
- # clojureverse-ops (5)
- # code-reviews (7)
- # community-development (6)
- # core-async (29)
- # cursive (50)
- # datomic (22)
- # docker (10)
- # figwheel-main (3)
- # fulcro (4)
- # graalvm (1)
- # introduce-yourself (2)
- # kaocha (9)
- # lambdaisland (2)
- # lsp (19)
- # malli (37)
- # off-topic (50)
- # polylith (8)
- # portal (1)
- # reagent (10)
- # rum (1)
- # shadow-cljs (24)
- # spacemacs (14)
- # yada (2)
How does one reference the ::before
selector using Reagent?
Afaik, Reagent creates inline styles and pseudo-selectors cannot be targeted via inline styles.
I see. Thanks.
If you want to apply css styles programmatically with cljs, you can do so conveniently with a tool like https://github.com/roosta/herb 🌿 or https://github.com/dhleong/spade ♠️ - both use https://github.com/noprompt/garden :female-farmer: syntax
Hey all, I'm trying to compile a clojurescript form within clojurescript, by defining a macro in a .clj
file
(ns my-worker.helpers
(:require [cljs.closure :as cljs]))
(defmacro compile-cljs [form] (cljs/build [form] {:optimizations :simple :pretty-print true}))
and then calling it from my .cljs
file
(def x (helpers/compile-cljs '[
(.log js/console "hello")]))
while this def would work totally fine in the .clj
file, it fails in the clojurescript file with the message
; clojure.lang.ExceptionInfo: Namespace declarations must appear at the top-level. at line 9
Why does that happen?had a coworker require [cljs.js :as js]
because he was using js/JSON
. Wanted to ask questions about that. I know it is unnecessary, but is it really even allowed? I thought the namespace js
was special and the compiler did its thing so i'm surprised it allowed an alias of that
@ottenjonas not sure what you are attempting - if that could work x
would be a string
yes that's what I want! (just using the def as an example here, but basically want to compile a form at compile time to js)