Fix: Empty Mini Cart Contents view in editor is not vertically centered on WP 6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6379)

This commit is contained in:
Tung Du 2022-05-06 18:05:54 +07:00 committed by GitHub
parent 62024321b9
commit 773db56bc5
3 changed files with 7 additions and 3 deletions

View File

@ -55,19 +55,21 @@
}
.wp-block-woocommerce-empty-mini-cart-contents-block {
min-height: 100vh;
overflow-y: unset;
padding: 0;
> .block-editor-inner-blocks {
box-sizing: border-box;
max-height: 100vh;
overflow-y: auto;
box-sizing: border-box;
padding: $gap-largest $gap $gap;
}
// Temporary fix after the appender button was positioned absolute
// See https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/5742#issuecomment-1032804168
.block-list-appender {
margin-top: $gap;
position: relative;
}

View File

@ -33,7 +33,9 @@ const EmptyMiniCartContentsBlock = ( {
return (
<div tabIndex={ -1 } ref={ elementRef } className={ className }>
{ children }
<div className="wc-block-mini-cart__empty-cart-wrapper">
{ children }
</div>
</div>
);
};

View File

@ -84,7 +84,7 @@
justify-content: space-between;
}
.wp-block-woocommerce-empty-mini-cart-contents-block {
.wp-block-woocommerce-empty-mini-cart-contents-block .wc-block-mini-cart__empty-cart-wrapper {
overflow-y: auto;
padding: $gap-largest $gap $gap;
}