🐛 Fix opacity on stroke gradients

This commit is contained in:
alonso.torres 2025-07-23 16:03:07 +02:00 committed by Andrey Antukh
parent 8254af27cb
commit 955538b12a
2 changed files with 7 additions and 6 deletions

View File

@ -48,6 +48,7 @@
- Fix "Copy as SVG" generates different code from the Inspect panel [Taiga #11519](https://tree.taiga.io/project/penpot/issue/11519)
- Fix overriden tokens in text copies are not preserved [Taiga #11486](https://tree.taiga.io/project/penpot/issue/11486)
- Fix problem when changing between flex/grid layout [Taiga #11625](https://tree.taiga.io/project/penpot/issue/11625)
- Fix opacity on stroke gradients [Taiga #11646](https://tree.taiga.io/project/penpot/issue/11646)
## 2.8.1 (Unreleased)

View File

@ -103,15 +103,15 @@
(obj/set! attrs "strokeWidth" width)
(when (some? gradient)
(if (some? gradient)
(let [gradient-id (dm/str "stroke-color-gradient-" render-id "-" index)]
(obj/set! attrs "stroke" (str/ffmt "url(#%)" gradient-id))))
(obj/set! attrs "stroke" (str/ffmt "url(#%)" gradient-id)))
(when-not (some? gradient)
(when (some? color)
(obj/set! attrs "stroke" color))
(when (some? opacity)
(obj/set! attrs "strokeOpacity" opacity)))
(obj/set! attrs "stroke" color)))
(when (some? opacity)
(obj/set! attrs "strokeOpacity" opacity))
(when (not= style :svg)
(obj/set! attrs "strokeDasharray" (calculate-dasharray style width)))