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 cff6f3783ed..b9ddb7c15cc 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 @@ -47,18 +47,7 @@ const Edit = ( { }: Props ): ReactElement => { const { currentView, width } = attributes; - const blockProps = useBlockProps( { - /** - * This is a workaround for the Site Editor to calculate the - * correct height of the Mini-Cart template part on the first load. - * - * @see https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/5825 - */ - style: { - minHeight: '100vh', - width, - }, - } ); + const blockProps = useBlockProps(); const defaultTemplate = [ [ 'woocommerce/filled-mini-cart-contents-block', {}, [] ], 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 680b0d163bf..9a37a3eab79 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 @@ -88,8 +88,12 @@ } } -.editor-styles-wrapper .wp-block-woocommerce-mini-cart-contents, -.editor-styles-wrapper .wp-block-woocommerce-filled-mini-cart-contents-block { - height: auto; - min-height: 500px; +/* Site Editor preview */ +.block-editor-block-preview__content-iframe .editor-styles-wrapper { + .wp-block-woocommerce-mini-cart-contents, + .wp-block-woocommerce-filled-mini-cart-contents-block, + .wp-block-woocommerce-empty-mini-cart-contents-block { + height: 800px; + min-height: none; + } }