0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 02:28:18 -05:00

🐛 Ignore style attr on fix-percents function

This commit is contained in:
Andrey Antukh 2024-01-30 16:49:18 +01:00
parent 8cc3669aac
commit fc0a4fa5b7

View file

@ -993,15 +993,7 @@
(fix-percent-attr-numeric [attrs key val]
(cond
(= key :style)
(let [val (->> (str/split val ";")
(map (fn [val]
(if (str/ends-with? val "%")
(let [[k v] (str/split val ":" 2)
v (fix-percent-attr-numeric-val v)]
(str k ":" v))
val)))
(str/join ";"))]
(assoc attrs key val))
attrs
(str/ends-with? val "%")
(assoc attrs key (fix-percent-attr-numeric-val val))