From 2ba0238509f437bdf37ef33592406a7893e81bef Mon Sep 17 00:00:00 2001 From: Eugene Kasimov Date: Thu, 26 Sep 2024 13:38:56 -0700 Subject: [PATCH] Adjust CSS for new Portable Wallet --- assets/base.css | 39 ++++++++++++++++++--------------------- assets/component-cart.css | 4 ---- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/assets/base.css b/assets/base.css index 979d9bd2ff7..365ad0875fa 100644 --- a/assets/base.css +++ b/assets/base.css @@ -1188,10 +1188,7 @@ deferred-media { .button, .shopify-challenge__button, .customer button, -button.shopify-payment-button__button--unbranded, -.shopify-payment-button [role='button'], -.cart__dynamic-checkout-buttons [role='button'], -.cart__dynamic-checkout-buttons iframe { +button.shopify-payment-button__button--unbranded { --shadow-horizontal-offset: var(--buttons-shadow-horizontal-offset); --shadow-vertical-offset: var(--buttons-shadow-vertical-offset); --shadow-blur-radius: var(--buttons-shadow-blur-radius); @@ -1211,15 +1208,6 @@ button.shopify-payment-button__button--unbranded { min-height: calc(4.5rem + var(--buttons-border-width) * 2); } -.shopify-payment-button__button--branded { - z-index: auto; -} - -.cart__dynamic-checkout-buttons iframe { - box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) - rgba(var(--color-shadow), var(--shadow-opacity)); -} - .button, .shopify-challenge__button, .customer button { @@ -1242,9 +1230,7 @@ button.shopify-payment-button__button--unbranded { .button:before, .shopify-challenge__button:before, .customer button:before, -.shopify-payment-button__button--unbranded:before, -.shopify-payment-button [role='button']:before, -.cart__dynamic-checkout-buttons [role='button']:before { +.shopify-payment-button__button--unbranded:before { content: ''; position: absolute; top: 0; @@ -1293,17 +1279,14 @@ button.shopify-payment-button__button--unbranded { .button:focus, .button.focused, .shopify-payment-button__button--unbranded:focus-visible, -.shopify-payment-button [role='button']:focus-visible, -.shopify-payment-button__button--unbranded:focus, -.shopify-payment-button [role='button']:focus { +.shopify-payment-button__button--unbranded:focus { outline: 0; box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.5rem rgba(var(--color-foreground), 0.5), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); } .button:focus:not(:focus-visible):not(.focused), -.shopify-payment-button__button--unbranded:focus:not(:focus-visible):not(.focused), -.shopify-payment-button [role='button']:focus:not(:focus-visible):not(.focused) { +.shopify-payment-button__button--unbranded:focus:not(:focus-visible):not(.focused) { box-shadow: inherit; } @@ -1333,6 +1316,20 @@ button.shopify-payment-button__button--unbranded { padding: 1.2rem 2.6rem; } +/* Shopify Accelerated Checkout */ + +shopify-accelerated-checkout { + --shopify-accelerated-checkout-button-border-radius: var(--buttons-radius-outset); + --shopify-accelerated-checkout-button-box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) + rgba(var(--color-shadow), var(--shadow-opacity));; +} +shopify-accelerated-checkout-cart { + --shopify-accelerated-checkout-button-border-radius: var(--buttons-radius-outset); + --shopify-accelerated-checkout-button-box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) + rgba(var(--color-shadow), var(--shadow-opacity));; +} + + /* Button - other */ .button:disabled, diff --git a/assets/component-cart.css b/assets/component-cart.css index 443bb2102b1..6e4d5c15ade 100644 --- a/assets/component-cart.css +++ b/assets/component-cart.css @@ -172,10 +172,6 @@ cart-items { margin: 0; } -.cart__dynamic-checkout-buttons div[role='button'] { - border-radius: var(--buttons-radius-outset) !important; -} - .cart__blocks > * + * { margin-top: 1rem; }