diff --git a/plugins/woocommerce/changelog/fix-blocks-9999-products-grid-layout-in-post b/plugins/woocommerce/changelog/fix-blocks-9999-products-grid-layout-in-post new file mode 100644 index 00000000000..7e81fd5f7c5 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-blocks-9999-products-grid-layout-in-post @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix the layout of View Cart link on the posts/pages diff --git a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss index 2e17e871a9a..f4df67ed96d 100644 --- a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss +++ b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss @@ -105,13 +105,13 @@ display: inline-block; float: none; // Remove float set by WC core. vertical-align: middle; - + // Adjust positioning of quantity selector and button. .qty { margin-right: 0.5rem; } } - + button[name="add-to-cart"], button.single_add_to_cart_button { display: inline-block; @@ -153,13 +153,6 @@ text-decoration: none; } - a.added_to_cart { - // Prevent "View Cart" button from sticking to "Add to Cart" button. - // For details see https://github.com/woocommerce/woocommerce-blocks/issues/5285. - display: block; - margin-top: 1rem; - } - span.onsale { // Style "On Sale" badge in theme colors by default. background-color: var(--wp--preset--color--foreground, $highlight); @@ -195,6 +188,16 @@ } } +/** +* Products grid +*/ +a.added_to_cart { + // Prevent "View Cart" button from sticking to "Add to Cart" button. + // For details see https://github.com/woocommerce/woocommerce-blocks/issues/5285. + display: block; + margin-top: 1rem; +} + /** * Form elements */