2021-10-25 14:46:34 +00:00
|
|
|
.wc-block-cart {
|
|
|
|
.wc-block-components-shipping-calculator {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-address-form {
|
|
|
|
.wc-block-components-text-input,
|
|
|
|
.wc-block-components-country-input,
|
|
|
|
.wc-block-components-state-input {
|
|
|
|
&:first-of-type {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-totals-taxes,
|
|
|
|
.wc-block-components-totals-footer-item {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2023-04-17 16:52:43 +00:00
|
|
|
|
|
|
|
table.wc-block-cart-items,
|
|
|
|
table.wc-block-cart-items th,
|
|
|
|
table.wc-block-cart-items td {
|
|
|
|
margin: 0 0 2em;
|
|
|
|
}
|
2021-10-25 14:46:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Loading placeholder state.
|
|
|
|
.wc-block-cart--is-loading,
|
|
|
|
.wc-block-mini-cart__drawer.is-loading {
|
|
|
|
th span,
|
|
|
|
h2 span {
|
|
|
|
@include placeholder();
|
|
|
|
@include force-content();
|
|
|
|
min-width: 84px;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
h2 span {
|
|
|
|
min-width: 33%;
|
|
|
|
}
|
|
|
|
.wc-block-components-product-price,
|
|
|
|
.wc-block-components-product-metadata,
|
|
|
|
.wc-block-components-quantity-selector {
|
|
|
|
@include placeholder();
|
|
|
|
}
|
|
|
|
.wc-block-components-product-name {
|
|
|
|
@include placeholder();
|
|
|
|
@include force-content();
|
|
|
|
min-width: 84px;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
.wc-block-components-product-metadata {
|
|
|
|
margin-top: 0.25em;
|
|
|
|
min-width: 8em;
|
|
|
|
}
|
|
|
|
.wc-block-cart-item__remove-link {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
.wc-block-cart-item__image > a {
|
|
|
|
@include placeholder();
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.wc-block-components-product-price {
|
|
|
|
@include force-content();
|
|
|
|
max-width: 3em;
|
|
|
|
display: block;
|
|
|
|
margin-top: 0.25em;
|
|
|
|
}
|
|
|
|
.wc-block-cart__sidebar .components-card {
|
|
|
|
@include placeholder();
|
|
|
|
@include force-content();
|
|
|
|
min-height: 460px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.wc-block-components-sidebar-layout.wc-block-cart--skeleton {
|
2019-12-10 15:41:57 +00:00
|
|
|
display: none;
|
|
|
|
}
|
2021-10-25 14:46:34 +00:00
|
|
|
.is-loading + .wc-block-components-sidebar-layout.wc-block-cart--skeleton {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-cart-item__total-price-and-sale-badge-wrapper {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-end;
|
Cart block: line-items front end initial work (https://github.com/woocommerce/woocommerce-blocks/pull/1333)
* render block on front end, add `Shopping cart` heading (baby steps)
* fake data for editing full cart + show line count in header
* add note about core/html using `is-active` class for toggle state
* reinstate work-in-progress full cart component (lost in rebase)
* reinstate full cart from master
* component for full cart title & item count + margin tweaks:
- add margin between main cart & sidebar
- add margin after cart block
* add cart items sample data + factor sample product image to module
* use sample cart data for item count
* basic table of cart line items (no styling)
* prettification
* show images for cart line items + initial table styling
* cart quantity selector component (work in progress)
* use state for cart product quantity, allow incr/decr from UI (WIP)
* replace WIP custom quantity control with number edit (temporary)
* correctly format cart line item total price
* align cart item columns with headings + indent image on desktop
* tweak css for cart line item padding on mobile so it's more explicit
* show cart line item full price if discounted
* add placeholder for cart remove item link
* switch cart table to flex layout (was table)…
This will allow us to move things around for mobile/responsive layout.
* only show cart items table header on desktop
* more cart items styling - row borders, appropriate padding +
+ move image width to variable
+ fix class name plurality for row (item not items)
* use standard $gap instead of 1em for padding/margins
* responsive (mobile) layout for cart line items:
- shift line $ total to bottom right
- stack quantity selector in product info column
* remove extraneous cart table padding on mobile
* comment about unused styles for quantity selector component
* add follow up issue for todo
* remove inappropriate href
* render srcset & sizes for cart line item product image
* remove todo comment
* switch back to table markup for cart items (in progress):
- table is more semantic, associates headers with columns
* cart line items column widths - product column is larger (60%)
* reinstate table row borders
* bottom-align line item price on mobile
* cart contents heading should be H2 + prettify
* remove unused QuantitySelector code/styles, rename main class in line with BEM
* defaults for QuantitySelector props
* variable/property name tidies - match conventions/API
* fix bug: line total price is only bottom-align on small screen
* move QuantitySelector to root of components, intended to be generally useful
* use lineItem directly for cart, specify shape in PropTypes
* rename cart components to align with "line item" rather than "product"
* rejig class names to better align with new component names & BEM style
* show cart item image correct size:
- use single column for product image and info, with flex container
- specify image width (rem instead of px)
* fix safari issue - cart product images displaying vertically stretched
* shift product name left margin from image, to account for no-image case
* experiment: bump bundlewatch size limit for cart temporarily:
- our fake data inline image is heavy
- when we switch to real API we will no longer need it
* fix issue introduced when moving margin from image to details div:
- product details needs margin on left (not right)
* fix react props issues:
- explicitly destructure image props for srcSet (vs srcset)
- use API key field for line item key instead of id, fix duplicate test id
- CartLineItemsTable takes an array of lineItems (incorrect PropTypes)
* remove redundant divs + use conventional `null` (when no full price)
* override editor styles to ensure cart product image is correct size
* move cart items editor style override to editor.css
* add an explicit readable heading for cart heading to match visual layout
2020-01-09 22:50:14 +00:00
|
|
|
|
2021-10-25 14:46:34 +00:00
|
|
|
.wc-block-components-sale-badge {
|
|
|
|
margin-top: $gap-smallest;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.is-small,
|
|
|
|
.is-mobile {
|
|
|
|
.wc-block-cart-item__total {
|
|
|
|
.wc-block-components-sale-badge {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2023-11-13 12:52:29 +00:00
|
|
|
table.wc-block-cart-items {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2021-10-25 14:46:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.is-medium,
|
|
|
|
.is-small,
|
|
|
|
.is-mobile {
|
|
|
|
&.wc-block-cart {
|
|
|
|
.wc-block-components-sidebar {
|
|
|
|
.wc-block-cart__totals-title {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.is-large.wc-block-cart {
|
Cart block: line-items front end initial work (https://github.com/woocommerce/woocommerce-blocks/pull/1333)
* render block on front end, add `Shopping cart` heading (baby steps)
* fake data for editing full cart + show line count in header
* add note about core/html using `is-active` class for toggle state
* reinstate work-in-progress full cart component (lost in rebase)
* reinstate full cart from master
* component for full cart title & item count + margin tweaks:
- add margin between main cart & sidebar
- add margin after cart block
* add cart items sample data + factor sample product image to module
* use sample cart data for item count
* basic table of cart line items (no styling)
* prettification
* show images for cart line items + initial table styling
* cart quantity selector component (work in progress)
* use state for cart product quantity, allow incr/decr from UI (WIP)
* replace WIP custom quantity control with number edit (temporary)
* correctly format cart line item total price
* align cart item columns with headings + indent image on desktop
* tweak css for cart line item padding on mobile so it's more explicit
* show cart line item full price if discounted
* add placeholder for cart remove item link
* switch cart table to flex layout (was table)…
This will allow us to move things around for mobile/responsive layout.
* only show cart items table header on desktop
* more cart items styling - row borders, appropriate padding +
+ move image width to variable
+ fix class name plurality for row (item not items)
* use standard $gap instead of 1em for padding/margins
* responsive (mobile) layout for cart line items:
- shift line $ total to bottom right
- stack quantity selector in product info column
* remove extraneous cart table padding on mobile
* comment about unused styles for quantity selector component
* add follow up issue for todo
* remove inappropriate href
* render srcset & sizes for cart line item product image
* remove todo comment
* switch back to table markup for cart items (in progress):
- table is more semantic, associates headers with columns
* cart line items column widths - product column is larger (60%)
* reinstate table row borders
* bottom-align line item price on mobile
* cart contents heading should be H2 + prettify
* remove unused QuantitySelector code/styles, rename main class in line with BEM
* defaults for QuantitySelector props
* variable/property name tidies - match conventions/API
* fix bug: line total price is only bottom-align on small screen
* move QuantitySelector to root of components, intended to be generally useful
* use lineItem directly for cart, specify shape in PropTypes
* rename cart components to align with "line item" rather than "product"
* rejig class names to better align with new component names & BEM style
* show cart item image correct size:
- use single column for product image and info, with flex container
- specify image width (rem instead of px)
* fix safari issue - cart product images displaying vertically stretched
* shift product name left margin from image, to account for no-image case
* experiment: bump bundlewatch size limit for cart temporarily:
- our fake data inline image is heavy
- when we switch to real API we will no longer need it
* fix issue introduced when moving margin from image to details div:
- product details needs margin on left (not right)
* fix react props issues:
- explicitly destructure image props for srcSet (vs srcset)
- use API key field for line item key instead of id, fix duplicate test id
- CartLineItemsTable takes an array of lineItems (incorrect PropTypes)
* remove redundant divs + use conventional `null` (when no full price)
* override editor styles to ensure cart product image is correct size
* move cart items editor style override to editor.css
* add an explicit readable heading for cart heading to match visual layout
2020-01-09 22:50:14 +00:00
|
|
|
margin-bottom: 3em;
|
2021-10-25 14:46:34 +00:00
|
|
|
|
|
|
|
.wc-block-components-radio-control__input {
|
|
|
|
left: 0;
|
2022-12-15 23:52:03 +00:00
|
|
|
margin: 0;
|
2021-10-25 14:46:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-cart__totals-title {
|
|
|
|
@include text-heading();
|
2021-10-25 15:31:12 +00:00
|
|
|
@include font-size( smaller );
|
2021-10-25 14:46:34 +00:00
|
|
|
display: block;
|
2023-12-07 08:55:47 +00:00
|
|
|
font-weight: 700;
|
2021-10-25 14:46:34 +00:00
|
|
|
padding: 0.25rem 0;
|
|
|
|
text-align: right;
|
|
|
|
text-transform: uppercase;
|
2023-12-07 08:55:47 +00:00
|
|
|
|
|
|
|
textarea {
|
|
|
|
font-weight: 700; // Ensure correct font-weight in site-editor.
|
|
|
|
}
|
2021-10-25 14:46:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
2022-04-01 13:45:18 +00:00
|
|
|
|
|
|
|
&:empty {
|
|
|
|
padding: 0;
|
|
|
|
}
|
2021-10-25 14:46:34 +00:00
|
|
|
}
|
Cart block: line-items front end initial work (https://github.com/woocommerce/woocommerce-blocks/pull/1333)
* render block on front end, add `Shopping cart` heading (baby steps)
* fake data for editing full cart + show line count in header
* add note about core/html using `is-active` class for toggle state
* reinstate work-in-progress full cart component (lost in rebase)
* reinstate full cart from master
* component for full cart title & item count + margin tweaks:
- add margin between main cart & sidebar
- add margin after cart block
* add cart items sample data + factor sample product image to module
* use sample cart data for item count
* basic table of cart line items (no styling)
* prettification
* show images for cart line items + initial table styling
* cart quantity selector component (work in progress)
* use state for cart product quantity, allow incr/decr from UI (WIP)
* replace WIP custom quantity control with number edit (temporary)
* correctly format cart line item total price
* align cart item columns with headings + indent image on desktop
* tweak css for cart line item padding on mobile so it's more explicit
* show cart line item full price if discounted
* add placeholder for cart remove item link
* switch cart table to flex layout (was table)…
This will allow us to move things around for mobile/responsive layout.
* only show cart items table header on desktop
* more cart items styling - row borders, appropriate padding +
+ move image width to variable
+ fix class name plurality for row (item not items)
* use standard $gap instead of 1em for padding/margins
* responsive (mobile) layout for cart line items:
- shift line $ total to bottom right
- stack quantity selector in product info column
* remove extraneous cart table padding on mobile
* comment about unused styles for quantity selector component
* add follow up issue for todo
* remove inappropriate href
* render srcset & sizes for cart line item product image
* remove todo comment
* switch back to table markup for cart items (in progress):
- table is more semantic, associates headers with columns
* cart line items column widths - product column is larger (60%)
* reinstate table row borders
* bottom-align line item price on mobile
* cart contents heading should be H2 + prettify
* remove unused QuantitySelector code/styles, rename main class in line with BEM
* defaults for QuantitySelector props
* variable/property name tidies - match conventions/API
* fix bug: line total price is only bottom-align on small screen
* move QuantitySelector to root of components, intended to be generally useful
* use lineItem directly for cart, specify shape in PropTypes
* rename cart components to align with "line item" rather than "product"
* rejig class names to better align with new component names & BEM style
* show cart item image correct size:
- use single column for product image and info, with flex container
- specify image width (rem instead of px)
* fix safari issue - cart product images displaying vertically stretched
* shift product name left margin from image, to account for no-image case
* experiment: bump bundlewatch size limit for cart temporarily:
- our fake data inline image is heavy
- when we switch to real API we will no longer need it
* fix issue introduced when moving margin from image to details div:
- product details needs margin on left (not right)
* fix react props issues:
- explicitly destructure image props for srcSet (vs srcset)
- use API key field for line item key instead of id, fix duplicate test id
- CartLineItemsTable takes an array of lineItems (incorrect PropTypes)
* remove redundant divs + use conventional `null` (when no full price)
* override editor styles to ensure cart product image is correct size
* move cart items editor style override to editor.css
* add an explicit readable heading for cart heading to match visual layout
2020-01-09 22:50:14 +00:00
|
|
|
}
|
2021-10-25 15:31:12 +00:00
|
|
|
|
|
|
|
.wp-block-woocommerce-cart.is-loading {
|
|
|
|
.wp-block-woocommerce-empty-cart-block {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.wp-block-woocommerce-filled-cart-block {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
margin: 0 auto $gap;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-items-block {
|
|
|
|
box-sizing: border-box;
|
|
|
|
margin: 0;
|
2022-03-28 13:00:20 +00:00
|
|
|
padding-right: math.percentage(math.div($gap-largest, 1060px)); // ~1060px is the default width of the content area in Storefront.
|
2021-10-25 15:31:12 +00:00
|
|
|
width: 65%;
|
|
|
|
min-height: 10em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-line-items-block {
|
|
|
|
min-height: 15em;
|
|
|
|
display: block;
|
|
|
|
@include placeholder();
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-totals-block {
|
|
|
|
box-sizing: border-box;
|
|
|
|
margin: 0;
|
2022-03-28 13:00:20 +00:00
|
|
|
padding-left: math.percentage(math.div($gap-large, 1060px));
|
2021-10-25 15:31:12 +00:00
|
|
|
width: 35%;
|
|
|
|
min-height: 12em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-order-summary-block,
|
|
|
|
.wp-block-woocommerce-cart-express-payment-block,
|
|
|
|
.wp-block-woocommerce-proceed-to-checkout-block,
|
|
|
|
.wp-block-woocommerce-cart-accepted-payment-methods-block {
|
|
|
|
min-height: 3em;
|
|
|
|
display: block;
|
|
|
|
@include placeholder();
|
|
|
|
margin: 0 0 1em 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-order-summary-block {
|
|
|
|
height: 20em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Skeleton is shown before mobile classes are appended.
|
|
|
|
@media only screen and ( max-width: 700px ) {
|
|
|
|
.wp-block-woocommerce-cart.is-loading {
|
|
|
|
padding-top: $gap;
|
|
|
|
|
|
|
|
.wp-block-woocommerce-filled-cart-block {
|
|
|
|
flex-direction: column;
|
|
|
|
margin: 0 auto $gap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-items-block {
|
|
|
|
padding: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wp-block-woocommerce-cart-totals-block {
|
|
|
|
padding: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|