0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 03:28:25 -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] (fix-percent-attr-numeric [attrs key val]
(cond (cond
(= key :style) (= key :style)
(let [val (->> (str/split val ";") attrs
(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))
(str/ends-with? val "%") (str/ends-with? val "%")
(assoc attrs key (fix-percent-attr-numeric-val val)) (assoc attrs key (fix-percent-attr-numeric-val val))