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:
parent
8cc3669aac
commit
fc0a4fa5b7
1 changed files with 1 additions and 9 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Reference in a new issue