diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/edit.tsx b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/edit.tsx index 3f9fbdd3f3d..775b7be6948 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/edit.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/edit.tsx @@ -123,7 +123,7 @@ const Edit = ( { }, [] ); return ( -
+ <> - - - - -
+ +
+
+ + + + +
+
+ ); }; diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/editor.scss b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/editor.scss index 8799739d463..680b0d163bf 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/editor.scss +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/mini-cart-contents/editor.scss @@ -1,8 +1,13 @@ -.editor-styles-wrapper .wp-block-woocommerce-mini-cart-contents { - /* We need to override the margin top here to simulate the layout of - the mini cart contents on the front end. */ - margin: 0 auto !important; +// Extra classes added for specificity, so we get rid of a top margin added by GB. +.editor-styles-wrapper .wc-block-editor-mini-cart-contents__wrapper.wc-block-editor-mini-cart-contents__wrapper { + display: flex; + justify-content: center; + margin: 0; + position: relative; + z-index: 9999; +} +.editor-styles-wrapper .wp-block-woocommerce-mini-cart-contents { .wp-block-woocommerce-empty-mini-cart-contents-block[hidden], .wp-block-woocommerce-filled-mini-cart-contents-block[hidden] { display: none;