Deraen / sass4clj

SASS compiler for Clj, Lein and Boot, using Libsass Java wrapper
70 stars 16 forks source link

Inlining CSS doesn't work #19

Closed SevereOverfl0w closed 7 years ago

SevereOverfl0w commented 7 years ago

I'm using @import "magnific-popup/dist/magnific-popup"; and I'm expecting the .css to be loaded.

This works as I expect:

(sass4clj.core/find-webjars
  {:asset-map (sass4clj.webjars/asset-map)}
  "magnific-popup/dist/magnific-popup.css")

So I'm not sure why the @import form doesn't work. But I'd expect this code to generate that string from my import.


Oh I should mention, I'm using boot-sass

This may be a boot-sass bug, this works:

(sass4clj.core/sass-compile
  "@import \"magnific-popup/dist/magnific-popup\""
  {})

as does this:

(sass4clj.core/sass-compile-to-file
  (clojure.java.io/file "src/scss/public/main.scss")
  (clojure.java.io/file "/tmp/output.css")
  {})
SevereOverfl0w commented 7 years ago

Sorry, I rebooted my REPL and that fixed it. boot-sass derives it's environment from the original set-env. So my hotloading of magnific-popup didn't work.