* fix: add wrapper for empty mini cart contents inner blocks. Allow inner content to be scrollable

* fix overflow issue for the editor

* add padding for the empty cart view
This commit is contained in:
Tung Du 2022-02-01 23:19:41 +07:00 committed by GitHub
parent 9d1464baf3
commit 995d41e2a9
4 changed files with 23 additions and 6 deletions

View File

@ -41,4 +41,16 @@
box-shadow: inset 0 0 0 1px;
color: inherit;
}
.wp-block-woocommerce-empty-mini-cart-contents-block {
overflow-y: unset;
padding: 0;
> .block-editor-inner-blocks {
max-height: 100vh;
overflow-y: auto;
box-sizing: border-box;
padding: $gap-largest $gap $gap;
}
}
}

View File

@ -1,5 +0,0 @@
const Block = ( { children }: { children: JSX.Element } ): JSX.Element => {
return <>{ children }</>;
};
export default Block;

View File

@ -20,7 +20,11 @@ const EmptyMiniCartContentsBlock = ( {
return null;
}
return <>{ children }</>;
return (
<div className="wp-block-woocommerce-empty-mini-cart-contents-block">
{ children }
</div>
);
};
export default EmptyMiniCartContentsBlock;

View File

@ -65,6 +65,7 @@
button {
color: inherit;
z-index: 9999;
}
svg {
@ -84,6 +85,11 @@
justify-content: center;
}
.wp-block-woocommerce-empty-mini-cart-contents-block {
overflow-y: auto;
padding: $gap-largest $gap $gap;
}
h2.wc-block-mini-cart__title {
@include font-size(larger);
margin: $gap-largest $gap 0;