Fix problems with extreme values

This commit is contained in:
alonso.torres 2022-03-02 15:50:06 +01:00
parent 999af63118
commit ed9400912c
59 changed files with 359 additions and 340 deletions

View file

@ -7,7 +7,6 @@
(ns app.util.code-gen
(:require
[app.common.data :as d]
[app.common.math :as mth]
[app.common.text :as txt]
[app.util.color :as uc]
[cuerdas.core :as str]))
@ -109,7 +108,7 @@
(every? #(or (nil? %) (= % 0)) value)
(or (nil? value) (= value 0))))
default-format (fn [value] (str (mth/precision value 2) "px"))
default-format (fn [value] (str value "px"))
format-property (fn [prop]
(let [css-prop (or (prop to-prop) (name prop))
format-fn (or (prop format) default-format)