Skip to content

Commit dd3a165

Browse files
mgascamRadoslavGeorgiev
authored andcommitted
Fix spinner misaligned in Proceed to Checkout button (#10960)
1 parent fd272ec commit dd3a165

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fix
3+
4+
Fix: Spinner alignment issues in cart checkout button and checkout address form email field.

client/cart/blocks/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Internal dependencies
33
*/
44
import { renderBNPLCartMessaging } from './product-details';
5+
import './style.scss';
56

67
const { registerPlugin } = window.wp.plugins;
78

client/cart/blocks/style.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Cart Blocks Styles
3+
*
4+
* This file contains styles specific to WooCommerce cart blocks
5+
* and WCPay integrations within the cart context.
6+
*/
7+
8+
/**
9+
* Fix for cart submit button spinner alignment
10+
*/
11+
.wc-block-cart__submit-button .wc-block-components-button__text {
12+
position: relative;
13+
14+
.wc-block-components-spinner {
15+
/* Override the base style's top/left: initial */
16+
top: 0;
17+
left: 0;
18+
}
19+
}

client/checkout/woopay/style.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@
2424
}
2525
}
2626

27+
/* Fix for address form email field spinner alignment */
28+
.wc-block-components-address-form__email {
29+
position: relative;
30+
31+
.wc-block-components-spinner {
32+
/* Override the base style's top/left: initial */
33+
top: 50%;
34+
left: auto;
35+
right: 10px;
36+
width: 24px;
37+
height: 24px;
38+
transform: translateY( -50% );
39+
}
40+
}
41+
2742
.woopay-login-session-iframe {
2843
width: 100%;
2944
height: 100vh;

includes/class-wc-payments.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,6 +1885,15 @@ public static function enqueue_cart_scripts() {
18851885
if ( WC_Payments_Utils::is_cart_block() ) {
18861886
self::register_script_with_dependencies( 'WCPAY_CART_BLOCK', 'dist/cart-block', [ 'wc-cart-block-frontend' ] );
18871887
wp_enqueue_script( 'WCPAY_CART_BLOCK' );
1888+
1889+
// Enqueue cart block styles.
1890+
WC_Payments_Utils::enqueue_style(
1891+
'WCPAY_CART_BLOCK',
1892+
plugins_url( 'dist/cart-block.css', WCPAY_PLUGIN_FILE ),
1893+
[],
1894+
self::get_file_version( 'dist/cart-block.css' ),
1895+
'all'
1896+
);
18881897
}
18891898
}
18901899

0 commit comments

Comments
 (0)