(color-css-value c)Produce the CSS value for a normalized colour name.
Produce the CSS value for a normalized colour name.
(normalize {:keys [size-raw color-raw label-raw label-present?]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :size-raw string | nil :color-raw string | nil :label-raw string | nil :label-present? boolean
Output keys: :size-css string (e.g. "20px") :color-css string ("inherit" or "var(...)") :label string ("" when absent / empty) :labelled? boolean (true only when label attribute is present AND non-empty)
Normalise raw attribute inputs into a stable view-model map.
Input keys:
:size-raw string | nil
:color-raw string | nil
:label-raw string | nil
:label-present? boolean
Output keys:
:size-css string (e.g. "20px")
:color-css string ("inherit" or "var(...)")
:label string ("" when absent / empty)
:labelled? boolean (true only when label attribute is present AND non-empty)(parse-color s)Parse the color attribute. Unknown / nil fall back to "inherit".
Parse the `color` attribute. Unknown / nil fall back to "inherit".
(parse-size s)Parse the size attribute.
Accepts a token (sm/md/lg/xl) or a positive integer in pixels.
Returns a map {:css "<n>px" :token <string|nil> :px <int>}.
Unknown / invalid values fall back to the default md (20px).
Parse the `size` attribute.
Accepts a token (`sm`/`md`/`lg`/`xl`) or a positive integer in pixels.
Returns a map `{:css "<n>px" :token <string|nil> :px <int>}`.
Unknown / invalid values fall back to the default `md` (20px).cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |