mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 20:41:38 +02:00
🐛 Fix border radius values with decimals
This commit is contained in:
parent
3dcd640a99
commit
52545692df
2 changed files with 13 additions and 4 deletions
|
@ -61,6 +61,7 @@
|
|||
- Fix text decoration on button [Taiga #5301](https://tree.taiga.io/project/penpot/issue/5301)
|
||||
- Fix menu order on design tab [Taiga #5195](https://tree.taiga.io/project/penpot/issue/5195)
|
||||
- Fix search bar width on layer tab [Taiga #5445](https://tree.taiga.io/project/penpot/issue/5445)
|
||||
- Fix border radius values with decimals [Taiga #5283](https://tree.taiga.io/project/penpot/issue/5283)
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
|
||||
|
|
|
@ -75,6 +75,14 @@
|
|||
(fmt/format-size :width value values)
|
||||
(fmt/format-size :heigth value values))))
|
||||
|
||||
(defn format-border-radius
|
||||
[values]
|
||||
|
||||
(and (coll? values) (d/not-empty? values))
|
||||
(->> values
|
||||
(map fmt/format-pixels)
|
||||
(str/join " ")))
|
||||
|
||||
(defn styles-data
|
||||
[shape]
|
||||
{:position {:props [:type]
|
||||
|
@ -90,7 +98,7 @@
|
|||
:rx "border-radius"
|
||||
:r1 "border-radius"}
|
||||
:format {:rotation #(str/fmt "rotate(%sdeg)" %)
|
||||
:r1 #(apply str/fmt "%spx %spx %spx %spx" %)
|
||||
:r1 format-border-radius
|
||||
:width #(get-size :width %)
|
||||
:height #(get-size :height %)}
|
||||
:multi {:r1 [:r1 :r2 :r3 :r4]}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue