From 405876b4568f7b939417a4b253edd17f4289a7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Fri, 27 Jan 2023 13:40:45 +0100 Subject: [PATCH] Remove size constrain in the Add to Cart button in block themes --- .../client/legacy/css/twenty-twenty-three.scss | 6 ------ .../legacy/css/woocommerce-blocktheme.scss | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss b/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss index 514389c4515..54a4546b2f6 100644 --- a/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss +++ b/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss @@ -336,12 +336,6 @@ margin-top: var(--wp--style--block-gap); } - button[name="add-to-cart"], - button.single_add_to_cart_button { - margin-top: 0.5rem; - margin-bottom: var(--wp--style--block-gap); - } - ol.flex-control-thumbs { padding-left: 0; float: left; diff --git a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss index 137756a3488..4f410a7c9e3 100644 --- a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss +++ b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss @@ -113,20 +113,22 @@ } } + .cart { + display: flex; + align-items: center; + } + .quantity { // Adjust positioning of quantity selector and button. .qty { margin-right: 0.5rem; } + } - + .single_add_to_cart_button { - min-height: 51px; - // We need to remove top and bottom padding because we are setting a fixed - // height. This is to prevent the button from being cut off. !important is - // needed to override the Elements API styles, which also use !important. - padding-top: 0 !important; - padding-bottom: 0 !important; - } + button[name="add-to-cart"], + button.single_add_to_cart_button { + margin-top: 0; + margin-bottom: 0; } .related.products {