0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

🐛 Treat vendor specific props correctly on attrs->props

This commit is contained in:
Andrey Antukh 2023-09-21 12:05:46 +02:00 committed by Andrés Moya
parent 896602903f
commit a2e3da2c07

View file

@ -558,8 +558,12 @@
(defn- camelize
[s]
(when (string? s)
#?(:cljs (js* "~{}.replace(\":\", \"-\").replace(/-./g, x=>x[1].toUpperCase())", s)
:clj (str/camel s))))
(let [vendor? (str/starts-with? s "-")
result #?(:cljs (js* "~{}.replace(\":\", \"-\").replace(/-./g, x=>x[1].toUpperCase())", s)
:clj (str/camel s))]
(if ^boolean vendor?
(str/capital result)
result))))
(defn parse-style
[style]