🐛 Fix copy font-size doesn't copy the unit (#6776)

This commit is contained in:
Marina López 2025-06-25 12:14:33 +02:00 committed by GitHub
parent ce59070fd1
commit 67ca8ccb22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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))]]]])