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

Fix: Empty Mini Cart Contents view in editor is not vertically centered on WP 6.0 #6379

Merged
merged 8 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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