Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix: Empty Mini Cart Contents view in editor is not vertically center…
Browse files Browse the repository at this point in the history
…ed on WP 6.0 (#6379)
  • Loading branch information
dinhtungdu authored May 6, 2022
1 parent 8b9bad7 commit 9dd3ac8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion assets/js/blocks/mini-cart/mini-cart-contents/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
};
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/mini-cart/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9dd3ac8

Please sign in to comment.