0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 Fix text weight on inspect code

This commit is contained in:
Alejandro Alonso 2023-01-27 09:21:42 +01:00 committed by Eva
parent 545b3860b4
commit 4f82f6bde4
4 changed files with 19 additions and 1 deletions

View file

@ -42,6 +42,7 @@
:font-family
:font-style
:font-size
:font-weight
:line-height
:letter-spacing
:text-decoration
@ -58,8 +59,9 @@
{:to-prop {:fill-color "color"
:fill-color-gradient "color"}
:format {:font-family #(str "'" % "'")
:font-style #(str "'" % "'")
:font-style #(str % )
:font-size #(str (format-number %) "px")
:font-weight name
:line-height #(format-number %)
:letter-spacing #(str (format-number %) "px")
:text-decoration name
@ -131,6 +133,12 @@
[:div.attributes-value (str (format-number (:font-size style))) "px"]
[:& copy-button {:data (copy-style-data style :font-size)}]])
(when (:font-weight style)
[:div.attributes-unit-row
[:div.attributes-label (tr "inspect.attributes.typography.font-weight")]
[:div.attributes-value (str (:font-weight style))]
[:& copy-button {:data (copy-style-data style :font-weight)}]])
(when (:line-height style)
[:div.attributes-unit-row
[:div.attributes-label (tr "inspect.attributes.typography.line-height")]

View file

@ -146,6 +146,7 @@
:font-family
:font-style
:font-size
:font-weight
:line-height
:letter-spacing
:text-decoration
@ -154,6 +155,7 @@
:format {:font-family #(str "'" % "'")
:font-style #(str %)
:font-size #(str % "px")
:font-weight #(str %)
:line-height #(str %)
:letter-spacing #(str % "px")
:text-decoration name

View file

@ -1106,6 +1106,10 @@ msgstr "Font Family"
msgid "inspect.attributes.typography.font-size"
msgstr "Font Size"
#: src/app/main/ui/inspect/attributes/text.cljs
msgid "inspect.attributes.typography.font-size"
msgstr "Font Weight"
#: src/app/main/ui/inspect/attributes/text.cljs
msgid "inspect.attributes.typography.font-style"
msgstr "Font Style"

View file

@ -1110,6 +1110,10 @@ msgstr "Familia tipográfica"
msgid "inspect.attributes.typography.font-size"
msgstr "Tamaño de fuente"
#: src/app/main/ui/inspect/attributes/text.cljs
msgid "inspect.attributes.typography.font-weight"
msgstr "Grosor de fuente"
#: src/app/main/ui/inspect/attributes/text.cljs
msgid "inspect.attributes.typography.font-style"
msgstr "Estilo de fuente"