CSS File Import Fails when using Path in ClojureScript Project

47 views Asked by At

I am working on an Electric Clojure project and I need to import a CSS file to style my application. I add styles using dom/element and it works but the code looks so crowded. What is the best way to import a CSS file into ClojureScript and apply the styles to the dom and reagent components?

I tried to import a CSS file into a Clojurescript project with Hiccup link:

[:link {:href "material-ui-test/src/app/main.css", :rel "stylesheet"}]]

Finally, I want to import CSS files of React components into the project.

1

There are 1 answers

0
Dustin Getz On

(dom/link (dom/props {:rel :stylesheet :href "/todo-list.css"})), there's a working example in the starter app here