diff --git a/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs b/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs index 4d600a4f9..9e7d93a3f 100644 --- a/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs +++ b/frontend/src/app/main/ui/viewer/inspect/attributes/text.cljs @@ -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")] diff --git a/frontend/src/app/util/code_gen.cljs b/frontend/src/app/util/code_gen.cljs index b28999a6f..239ef4034 100644 --- a/frontend/src/app/util/code_gen.cljs +++ b/frontend/src/app/util/code_gen.cljs @@ -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 diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 1badabd34..67e486974 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -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" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index f236a2239..03c0de66c 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -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"