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

Commit

Permalink
Fix wide appender buttons overlap in Cart & Checkout blocks in the Ed…
Browse files Browse the repository at this point in the history
…itor (#5801)

* Add the correct appender button for non empty groups

* Revert "Add the correct appender button for non empty groups"

This reverts commit 4b41d7d.

* Force position relative for custom InnerBlocks.ButtonBlockAppender  appenders.

Removing InnerBlocks.ButtonBlockAppender  from renderAppender = {InnerBlocks.ButtonBlockAppender } results in the black appender button beeing shown only when the block is selected, and we need the appender to be visible by default.
  • Loading branch information
ralucaStan committed Feb 10, 2022
1 parent a9dc0e1 commit bc4c471
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/js/blocks/cart-checkout/cart/editor.scss
Expand Up @@ -20,3 +20,12 @@ body.wc-lock-selected-block--remove {
}
}

.wp-block-woocommerce-cart-items-block,
.wp-block-woocommerce-cart-totals-block,
.wp-block-woocommerce-empty-cart-block {
// 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 {
position: relative;
}
}
13 changes: 13 additions & 0 deletions assets/js/blocks/cart-checkout/mini-cart-contents/editor.scss
Expand Up @@ -21,6 +21,13 @@
flex-direction: column;
height: 100%;
}

// 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 {
position: relative;
}

}

.wp-block-woocommerce-mini-cart-products-table-block {
Expand Down Expand Up @@ -52,5 +59,11 @@
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 {
position: relative;
}
}
}
6 changes: 6 additions & 0 deletions assets/js/blocks/checkout/styles/editor.scss
Expand Up @@ -23,6 +23,12 @@
.block-editor-block-list__layout {
display: block;
}

// 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 {
position: relative;
}
}
}

Expand Down

0 comments on commit bc4c471

Please sign in to comment.