(normalize {:keys [size-raw axis-raw grow-raw]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :size-raw string | nil :axis-raw string | nil :grow-raw string | nil
Output keys: :size string — CSS length value :axis string — 'vertical' | 'horizontal' :grow? boolean — true when grow attribute is present
Normalise raw attribute inputs into a stable view-model map. Input keys: :size-raw string | nil :axis-raw string | nil :grow-raw string | nil Output keys: :size string — CSS length value :axis string — 'vertical' | 'horizontal' :grow? boolean — true when grow attribute is present
(parse-axis s)Normalise axis attribute. Unknown / nil values fall back to 'vertical'.
Normalise axis attribute. Unknown / nil values fall back to 'vertical'.
(parse-grow s)Returns true when the grow attribute is present and not explicitly 'false'. grow is false when absent (nil), true when present (empty string or any value other than 'false').
Returns true when the grow attribute is present and not explicitly 'false'. grow is false when absent (nil), true when present (empty string or any value other than 'false').
(parse-size s)Returns the size value, or the default when nil/blank.
Returns the size value, or the default when nil/blank.
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 |