Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 99fecd7

Browse files
committed
Show three Express Payments buttons in-line (#8601)
1 parent 6abd4bc commit 99fecd7

File tree

1 file changed

+11
-25
lines changed
  • assets/js/blocks/cart-checkout-shared/payment-methods/express-payment

1 file changed

+11
-25
lines changed

assets/js/blocks/cart-checkout-shared/payment-methods/express-payment/style.scss

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ $border-radius: 5px;
77

88
.wc-block-components-express-payment__event-buttons {
99
list-style: none;
10-
display: flex;
11-
flex-direction: row;
12-
flex-wrap: wrap;
10+
display: grid;
11+
grid-template-columns: repeat(auto-fit, minmax(calc(33% - 10px), 1fr));
12+
grid-gap: 10px;
13+
box-sizing: border-box;
1314
width: 100%;
1415
padding: 0;
1516
margin: 0;
@@ -18,13 +19,20 @@ $border-radius: 5px;
1819

1920
> li {
2021
margin: 0;
22+
width: 100%;
2123

2224
> img {
2325
width: 100%;
2426
height: 48px;
2527
}
2628
}
2729
}
30+
31+
@include breakpoint("<782px") {
32+
.wc-block-components-express-payment__event-buttons {
33+
grid-template-columns: 1fr;
34+
}
35+
}
2836
}
2937

3038
.wc-block-components-express-payment--checkout {
@@ -85,28 +93,6 @@ $border-radius: 5px;
8593
margin-bottom: em($gap);
8694
}
8795
}
88-
89-
.wc-block-components-express-payment__event-buttons {
90-
> li {
91-
box-sizing: border-box;
92-
display: inline-block;
93-
width: 50%;
94-
}
95-
96-
> li:nth-child(even) {
97-
padding-left: $gap-smaller;
98-
}
99-
100-
> li:nth-child(odd) {
101-
padding-right: $gap-smaller;
102-
}
103-
104-
> li:only-child {
105-
display: block;
106-
width: 100%;
107-
padding: 0;
108-
}
109-
}
11096
}
11197

11298
.wc-block-components-express-payment--cart {

0 commit comments

Comments
 (0)