Merge pull request #3720 from penpot/alotor-fix-inspect

🐛 Fix problem with inspect
This commit is contained in:
Eva Marco 2023-10-23 09:57:23 +02:00 committed by GitHub
commit a421e39b6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 105 additions and 84 deletions

View file

@ -16,7 +16,7 @@
[app.common.types.shape.layout :as ctl]
[app.main.ui.shapes.text.styles :as sts]
[app.util.code-gen.common :as cgc]
[app.util.code-gen.style-css-formats :refer [format-value]]
[app.util.code-gen.style-css-formats :refer [format-value format-shadow]]
[app.util.code-gen.style-css-values :refer [get-value]]
[cuerdas.core :as str]))
@ -117,17 +117,6 @@ body {
:grid-row
:grid-area])
(def text-node-css-properties
[:font-family
:font-style
:font-size
:font-weight
:line-height
:letter-spacing
:text-decoration
:text-transform
:color])
(defn shape->css-property
[shape objects property]
(when-let [value (get-value property shape objects)]
@ -317,3 +306,7 @@ body {
(->> shapes
(keep #(get-shape-css-selector % objects options))
(str/join "\n\n")))))
(defn shadow->css
[shadow]
(dm/str "box-shadow: " (format-shadow shadow {})))