fix/8651: Use body background color as the Cart block sticky footer background color (https://github.com/woocommerce/woocommerce-blocks/pull/9103)
* Use body background color as the Cart block sticky footer background color * Reduce the opacity of box-shadow. * Fix the Proceed to Checkout button cut off.
This commit is contained in:
parent
7dcb7768b2
commit
32f43e3d84
|
@ -86,6 +86,9 @@ const Block = ( {
|
|||
</Button>
|
||||
);
|
||||
|
||||
// Get the body background color to use as the sticky container background color.
|
||||
const backgroundColor = getComputedStyle( document.body ).backgroundColor;
|
||||
|
||||
return (
|
||||
<div className={ classnames( 'wc-block-cart__submit', className ) }>
|
||||
{ positionReferenceElement }
|
||||
|
@ -95,7 +98,10 @@ const Block = ( {
|
|||
</div>
|
||||
{ /* If the positionReferenceElement is below the viewport, display the sticky container. */ }
|
||||
{ positionRelativeToViewport === 'below' && (
|
||||
<div className="wc-block-cart__submit-container wc-block-cart__submit-container--sticky">
|
||||
<div
|
||||
className="wc-block-cart__submit-container wc-block-cart__submit-container--sticky"
|
||||
style={ { backgroundColor } }
|
||||
>
|
||||
{ submitContainerContents }
|
||||
</div>
|
||||
) }
|
||||
|
|
|
@ -30,10 +30,11 @@
|
|||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 9999;
|
||||
box-sizing: border-box;
|
||||
|
||||
&::before {
|
||||
box-shadow: 0 -10px 20px 10px currentColor;
|
||||
color: color.adjust($gray-400, $alpha: -0.5);
|
||||
color: color.adjust($gray-400, $alpha: -0.7);
|
||||
content: "";
|
||||
height: 100%;
|
||||
left: 0;
|
||||
|
|
Loading…
Reference in New Issue