【问题标题】:How to generate CSS using Garden with ClojureScript (lein-garden)如何使用带有 ClojureScript 的 Garden 生成 CSS (lein-garden)
【发布时间】:2014-12-31 20:31:13
【问题描述】:

我似乎无法让 Garden 使用 ClojureScript。有咒语可以执行吗?文档根本没有提到 clojurescript,只是 clojure... 但首选 clojurescript。

另外,这个人提到它使用 clojurescript:

Is there a lib for manipulating CSS on the client side in Clojurescript?

这是真的吗,还是他是一个肮脏、可恶的骗子? ;)

【问题讨论】:

  • 你尝试了什么,你得到了什么错误?

标签: css clojure leiningen clojurescript


【解决方案1】:

repo 表示它适用于 ClojureScript 并且存在 CLJX 文件。

我刚刚尝试使用 ClojureScript 0.0-2511[garden "1.2.5"] 放入我的 project.clj:dependencies 中,并在我的一个命名空间中为 [garden.core :refer [css]] 添加了一个 :require,在 ClojureScript REPL 中,事情似乎工作:

(css [:body {:font-size "16px"}])
=> "body {\n  font-size: 16px;\n}"
(css [:h1 :h2 {:font-weight "none"}])
=> "h1, h2 {\n  font-weight: none;\n}"

【讨论】:

  • 谢谢。显然我使用的是旧版本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-08-29
  • 2020-09-27
  • 1970-01-01
  • 2020-01-28
  • 1970-01-01
  • 2012-04-22
  • 2019-10-18
相关资源
最近更新 更多