Skip to content

Commit

Permalink
Styling (margin and padding) tweaks (woocommerce#4974)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley authored and jonny-bull committed Dec 16, 2021
1 parent 67d2e6a commit 797bc50
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 15 deletions.
1 change: 1 addition & 0 deletions assets/js/blocks/cart-checkout/cart-i2/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { SlotFillProvider } from '@woocommerce/blocks-checkout';
* Internal dependencies
*/
import { CartBlockContext } from './context';
import './style.scss';

const reloadPage = () => void window.location.reload( true );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
// Adjust padding and margins in the editor to improve selected block outlines.
.wp-block-woocommerce-cart-express-payment-block {
margin: 14px 0 28px;

.components-placeholder__label svg {
font-size: 1em;
}

.wc-block-components-express-payment-continue-rule--checkout {
margin-bottom: 0;
}
.wc-block-cart__payment-options {
padding: 0;

&.wp-block-woocommerce-cart-express-payment-block--has-express-payment-methods {
padding: 14px 0;
margin: -14px 0 14px 0 !important;
position: relative;
.wc-block-components-express-payment-continue-rule {
margin-bottom: -12px;
}
}
}

Expand Down
59 changes: 54 additions & 5 deletions assets/js/blocks/cart-checkout/cart-i2/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
.wp-block-woocommerce-cart.is-loading {
display: none;
}

.wp-block-woocommerce-cart {
.wp-block-woocommerce-cart-i2 {
margin-bottom: 3em;

.wc-block-cart-items {
@include with-translucent-border(0 0 1px);

th {
padding: 0.25rem $gap 0.25rem 0;
white-space: nowrap;
}
td {
@include with-translucent-border(1px 0 0);
padding: $gap 0 $gap $gap;
vertical-align: top;
}
th:last-child {
padding-right: 0;
}
td:last-child {
padding-right: $gap;
}
}

.wc-block-cart__sidebar {
& > div:not(.wc-block-components-totals-wrapper) {
margin-left: $gap;
margin-right: $gap;
}
}

.wc-block-components-radio-control__input {
left: 0;
}

.wc-block-cart__totals-title {
@include text-heading();
@include font-size(smaller);
display: block;
font-weight: 600;
padding: 0.25rem 0;
text-align: right;
text-transform: uppercase;
}

.wc-block-components-sidebar {
.wc-block-components-shipping-calculator,
.wc-block-components-shipping-rates-control__package:not(.wc-block-components-panel) {
padding-left: $gap;
padding-right: $gap;
}
}

.wc-block-cart__payment-options {
padding: $gap 0 0;
}
}
2 changes: 1 addition & 1 deletion assets/js/blocks/cart-checkout/cart/full-cart/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ table.wc-block-cart-items {
}
}

.is-large.wc-block-cart {
.is-large.wp-block-woocommerce-cart {
.wc-block-cart-items {
@include with-translucent-border(0 0 1px);

Expand Down
4 changes: 4 additions & 0 deletions packages/checkout/components/totals-wrapper/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
@include with-translucent-border(1px 0 0);
padding: $gap 0;

&:last-child {
padding-bottom: 0;
}

&.has-bottom-border {
&::after {
border-bottom-width: 1px;
Expand Down

0 comments on commit 797bc50

Please sign in to comment.