From 67ca8ccb229236e33f987109fe380450933750d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20L=C3=B3pez?= Date: Wed, 25 Jun 2025 12:14:33 +0200 Subject: [PATCH] :bug: Fix copy font-size doesn't copy the unit (#6776) --- CHANGES.md | 1 + frontend/src/app/main/ui/inspect/attributes/text.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index fd09017b80..f6152860ee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ - Change "Save color" button to primary button [Taiga #9410](https://tree.taiga.io/project/penpot/issue/9410) ### :bug: Bugs fixed +- Copying font size does not copy the unit [Taiga #11143](https://tree.taiga.io/project/penpot/issue/11143) ## 2.8.0 (Next / Unreleased) diff --git a/frontend/src/app/main/ui/inspect/attributes/text.cljs b/frontend/src/app/main/ui/inspect/attributes/text.cljs index f99037a186..82ad28fdf2 100644 --- a/frontend/src/app/main/ui/inspect/attributes/text.cljs +++ b/frontend/src/app/main/ui/inspect/attributes/text.cljs @@ -101,7 +101,7 @@ [:div {:class (stl/css :global/attr-label)} (tr "inspect.attributes.typography.font-size")] [:div {:class (stl/css :global/attr-value)} - [:> copy-button* {:data (copy-style-data style :font-size)} + [:> copy-button* {:data (copy-style-data (assoc style :font-size (fmt/format-pixels (:font-size style))) :font-size)} [:div {:class (stl/css :button-children)} (fmt/format-pixels (:font-size style))]]]])