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)
(:layout-item-h-sizing shape)
(:layout-item-v-sizing shape))]
(if (string? value)
value
(if (= sizing :fill)
"100%"
(str (format-pixels value))))))
(cond
(= sizing :fill) "100%"
(= sizing :auto) "auto"
(number? value) (format-pixels value)
:else value)))
(defn format-padding
[padding-values type]