Bläddra i källkod

Varia: Fix PayPal express checkout buttons.

Allan Cole 5 år sedan
förälder
incheckning
df9ca102d1

+ 24 - 2
varia/sass/vendors/woocommerce/components/_mini-cart.scss

@@ -61,17 +61,39 @@ body[class*="woocommerce"] #page { // adding #page here to override default wc s
 
 			.woocommerce-mini-cart__buttons {
 				text-align: right;
+
 				a {
+					clear: right;
 					color: map-deep-get($config-woocommerce, "mini-cart", "button", "color");
 					background-color: map-deep-get($config-woocommerce, "mini-cart", "button", "background-color");
 					margin: 0;
-					text-align: right;
+					float: right;
+
+					// Default WooCommerce View Cart/Checkout buttons
+					&:first-child:nth-last-child(2),
+					&:first-child:nth-last-child(2) ~ a {
+						clear: inherit;
+						float: inherit;
+						margin-bottom: 0;
+
+						&:not(:last-child) {
+							margin-right: #{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
+						}
+					}
 
 					&:not(:last-child) {
-						margin-right: #{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
+						margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
+					}
+
+					&.wcppec-cart-widget-button {
+						display: inline-block;
 					}
 				}
 			}
+
+			p.buttons.wcppec-cart-widget-spb {
+				padding: 0;
+			}
 		}
 
 		ul.cart_list li a,

+ 14 - 13
varia/sass/vendors/woocommerce/pages/_checkout.scss

@@ -73,9 +73,7 @@ body[class*="woocommerce"] #page { // adding #page here to override default wc s
 	}
 
 	#add_payment_method {
-
 		table.cart {
-
 			.product-thumbnail {
 				min-width: map-deep-get($config-global, "spacing", "horizontal");
 			}
@@ -90,26 +88,29 @@ body[class*="woocommerce"] #page { // adding #page here to override default wc s
 				margin: 0 map-deep-get($config-global, "spacing", "unit") 0 0;
 			}
 		}
+	}
 
-		.wc-proceed-to-checkout {
+	.wc-proceed-to-checkout {
 
-			padding: map-deep-get($config-global, "spacing", "vertical") 0;
+		padding: map-deep-get($config-global, "spacing", "vertical") 0;
 
-			a.checkout-button {
-				margin-bottom: map-deep-get($config-global, "spacing", "vertical");
-				font-size: map-deep-get($config-global, "font", "size", "md");
-				padding: map-deep-get($config-global, "spacing", "unit");
-			}
+		a.checkout-button {
+			margin-bottom: map-deep-get($config-global, "spacing", "unit");
+			font-size: map-deep-get($config-global, "font", "size", "md");
+			padding: map-deep-get($config-global, "spacing", "unit");
 		}
 
-		.checkout .create-account small {
-			font-size: map-deep-get($config-global, "font", "size", "xs");
-			color: map-deep-get($config-global, "color", "foreground", "light");
+		a.wcppec-checkout-buttons__button {
+			padding-top: 0;
 		}
 	}
 
-	#payment {
+	.checkout .create-account small {
+		font-size: map-deep-get($config-global, "font", "size", "xs");
+		color: map-deep-get($config-global, "color", "foreground", "light");
+	}
 
+	#payment {
 		background: transparent;
 		border: map-deep-get($config-woocommerce, "table", "border", "width") solid map-deep-get($config-woocommerce, "table", "border", "color");
 		border-radius: map-deep-get($config-woocommerce, "table", "border", "radius");

+ 7 - 0
varia/sass/vendors/woocommerce/pages/_single-product.scss

@@ -135,5 +135,12 @@
 				}
 			}
 		}
+
+		.woo_pp_cart_buttons_div {
+			text-align: left;
+			.wcppec-checkout-buttons__button {
+				padding-top: 0;
+			}
+		}
 	}
 }

+ 39 - 6
varia/style-woocommerce.css

@@ -830,16 +830,37 @@ body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .wooc
 }
 
 body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a {
+	clear: right;
 	color: white;
 	background-color: blue;
 	margin: 0;
-	text-align: right;
+	float: right;
 }
 
-body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a:not(:last-child) {
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a:first-child:nth-last-child(2),
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a:first-child:nth-last-child(2) ~ a {
+	clear: inherit;
+	float: inherit;
+	margin-bottom: 0;
+}
+
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a:first-child:nth-last-child(2):not(:last-child),
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a:first-child:nth-last-child(2) ~ a:not(:last-child) {
 	margin-right: 8px;
 }
 
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a:not(:last-child) {
+	margin-bottom: 8px;
+}
+
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a.wcppec-cart-widget-button {
+	display: inline-block;
+}
+
+body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget p.buttons.wcppec-cart-widget-spb {
+	padding: 0;
+}
+
 body[class*="woocommerce"] #page .main-navigation ul.cart_list li a,
 body[class*="woocommerce"] #page .main-navigation ul.product_list_widget li a {
 	padding: 0;
@@ -1529,17 +1550,21 @@ body[class*="woocommerce"] #page #add_payment_method table.cart td.actions .coup
 	margin: 0 16px 0 0;
 }
 
-body[class*="woocommerce"] #page #add_payment_method .wc-proceed-to-checkout {
+body[class*="woocommerce"] #page .wc-proceed-to-checkout {
 	padding: 32px 0;
 }
 
-body[class*="woocommerce"] #page #add_payment_method .wc-proceed-to-checkout a.checkout-button {
-	margin-bottom: 32px;
+body[class*="woocommerce"] #page .wc-proceed-to-checkout a.checkout-button {
+	margin-bottom: 16px;
 	font-size: 1.2rem;
 	padding: 16px;
 }
 
-body[class*="woocommerce"] #page #add_payment_method .checkout .create-account small {
+body[class*="woocommerce"] #page .wc-proceed-to-checkout a.wcppec-checkout-buttons__button {
+	padding-top: 0;
+}
+
+body[class*="woocommerce"] #page .checkout .create-account small {
 	font-size: 0.69444rem;
 	color: #767676;
 }
@@ -1852,6 +1877,14 @@ body[class*="woocommerce"] #page .woocommerce-ordering select {
 	display: none;
 }
 
+.single-product #page #woocommerce-wrapper div.product .woo_pp_cart_buttons_div {
+	text-align: left;
+}
+
+.single-product #page #woocommerce-wrapper div.product .woo_pp_cart_buttons_div .wcppec-checkout-buttons__button {
+	padding-top: 0;
+}
+
 /**
  * Widget Imports
  */