Charmingly Simple Styling library allows using clojure data structures to define application styles.
It adds JVM-wide support for cljfxcss
URL protocol that can then be used to retrieve
registered style maps as CSS
Charmingly Simple Styling library allows using clojure data structures to define application styles. It adds JVM-wide support for `cljfxcss` URL protocol that can then be used to retrieve registered style maps as CSS
(register id m)
Globally register style map describing CSS with associated keyword identifier
Returns a map with additional key :cljfx.css/url
containing URL string pointing to CSS
derived from style map
CSS is created by recursively concatenating string keys starting from root to define selectors, while using keyword keys in value maps to define rules, for example:
{".button" {:-fx-text-fill "#ccc"
":hover" {:-fx-text-fill "#aaa"}}}
;; corresponds to this css:
.button {
-fx-text-fill: #ccc;
}
.button:hover {
-fx-text-fill: #aaa;
}
Globally register style map describing CSS with associated keyword identifier Returns a map with additional key `:cljfx.css/url` containing URL string pointing to CSS derived from style map CSS is created by recursively concatenating string keys starting from root to define selectors, while using keyword keys in value maps to define rules, for example: ``` {".button" {:-fx-text-fill "#ccc" ":hover" {:-fx-text-fill "#aaa"}}} ;; corresponds to this css: .button { -fx-text-fill: #ccc; } .button:hover { -fx-text-fill: #aaa; } ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close