0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

♻️ Improve a case

This commit is contained in:
Eva 2023-01-27 12:04:30 +01:00 committed by Alejandro Alonso
parent aa3438f800
commit e7ddd6055f

View file

@ -67,11 +67,11 @@
(let [sizing (if (= type :width) (let [sizing (if (= type :width)
(:layout-item-h-sizing shape) (:layout-item-h-sizing shape)
(:layout-item-v-sizing shape))] (:layout-item-v-sizing shape))]
(if (string? value) (cond
value (= sizing :fill) "100%"
(if (= sizing :fill) (= sizing :auto) "auto"
"100%" (number? value) (format-pixels value)
(str (format-pixels value)))))) :else value)))
(defn format-padding (defn format-padding
[padding-values type] [padding-values type]