Skip to content

Commit

Permalink
Adjust CSS for new Portable Wallet (Shopify#3629)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenekasimov authored and nathan-scheele committed Nov 26, 2024
1 parent fa5c335 commit be1beb3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 25 deletions.
39 changes: 18 additions & 21 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1173,10 +1173,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);
Expand All @@ -1196,15 +1193,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 {
Expand All @@ -1227,9 +1215,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;
Expand Down Expand Up @@ -1278,17 +1264,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;
}

Expand Down Expand Up @@ -1318,6 +1301,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,
Expand Down
4 changes: 0 additions & 4 deletions assets/component-cart.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit be1beb3

Please sign in to comment.