From ea919b6e262d74a48b910a84604b400a2178c884 Mon Sep 17 00:00:00 2001 From: Ariella Eliassaf Date: Tue, 27 Jun 2023 10:36:50 +0300 Subject: [PATCH] fix(pushbutton-element): incorrect colors for button gradient on safari when there are multiple buttons close #153 --- src/pushbutton-element.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pushbutton-element.ts b/src/pushbutton-element.ts index 68bff92..c0f1d61 100644 --- a/src/pushbutton-element.ts +++ b/src/pushbutton-element.ts @@ -33,10 +33,6 @@ export class PushbuttonElement extends LitElement { -moz-appearance: none; } - button:active .button-circle { - fill: url(#grad-down); - } - .clickable-element { cursor: pointer; } @@ -56,7 +52,7 @@ export class PushbuttonElement extends LitElement { render() { const { color, label } = this; - const buttonFill = this.pressed ? 'url(#grad-down)' : 'url(#grad-up)'; + const buttonFill = this.pressed ? `url(#grad-down-${color})` : `url(#grad-up-${color})`; return html`