public function woocommerce_cart_menu($menu, $args) {
// Only continue if woocommerce mini cart is available and we're on the primary_navigation menu
- if (!function_exists('woocommerce_mini_cart') || $args->theme_location !== 'primary_navigation') return $menu;
+ if (!function_exists('woocommerce_mini_cart')
+ //|| WC()->cart->cart_contents_count < 1
+ || $args->theme_location !== 'primary_navigation') {
+ return $menu;
+ }
$menu .= template('woocommerce/mini-cart');
.menu-cart
+ padding: 0
&-icon
display: block
&-link
position: relative
display: block
- padding-bottom: 0
+ padding-bottom: 0.2em;
+ margin-bottom: 0.8em;
+ margin-top: 0.9em;
// Create a larger hover zone for the cart icon to make
// it easier to touch and keep over when viewing the dropdown
&:before
content: ''
position: absolute
- height: 100%
- left: -1em
- right: @left
+ top: -1em
+ right: @top
+ bottom: @top
+ left: @top
.sub-menu-mini-cart
- padding: 1em 2em 2em 2em
+ padding: 0
left: unset
right: -1.7em
transform: none
color: #fff
.woocommerce-mini-cart
- padding: 0
+ padding: 1em 2em !important
+ max-height: calc(100vh - 54px - 160px) // Screen height - header height + slight overlap - mini-cart footer height
+ overflow-y: auto
+ height: 100%
&__empty-message
- font-size: 80%
+ padding: 1em 2em
font-weight: normal
opacity: 0.5
&__total
white-space: nowrap
- margin-top: 1em
+ padding: 1em 2em
+ margin-bottom: 0 !important
+ border-top: 1px solid rgba(#fff, 0.2)
&__buttons
+ padding: 0 2em 1.5em
+
.button
border: none
- display: block
+ display: block !important
border-radius: 99em
background-color: $colors.blue
- padding: 0.7em 1.8em
+ padding: 0.7em 1.8em !important
white-space: nowrap
transition: background-color 0.2s
+ line-height: 1
+ font-size: inherit
+ font-weight: 700
&:hover
background-color: $colors.light-blue !important
border-radius: 50%
a
+ display: inline !important
white-space: nowrap
+ font-weight: inherit !important
+
+ &:hover
+ color: $colors.light-blue
img
display: none
margin-bottom: 0.5em
// Button overrides
+ .button
+ &:focus
+ outline: none !important
+ box-shadow: 0 0 0 2px $colors.dark-blue
+
#respond input#submit,
a.button,
button.button,
a.added_to_cart
padding-top: 0
- margin-left: 1em
+ margin: 1em
color: $colors.dark-blue
&:hover
color: $colors.blue
+ .single_add_to_cart_button
+ margin-left: 1.5em !important
+
// Product grid
ul.products
li.product
h3
text-transform: uppercase
+ .woocommerce-loop-product__link
+ display: block
+
+ &:focus
+ outline-offset: 0.5em
+ outline: 1px dotted $colors.blue
+
// Single Product
div.product
form.cart
margin-right: 0.5em
p.price, span.price
- margin-bottom: 1.5em
+ margin-bottom: 0.5em
+
+ .woocommerce-product-details__short-description
+ margin-bottom: 1.5em
+
+ // Cart
+ &-cart
+ table.cart
+ td.actions
+ .coupon
+ display: flex
+
+ .input-text
+ width: 10em
+ margin-right: 1em
// Order details
.woocommerce-order-details
margin-top: 0.25em
+ // Checkout
+ &-checkout
+ #payment
+ background-color: $colors.light-grey
+
+ div.payment_box
+ background-color: darken($colors.light-grey, 5%)
+
+ &:before
+ border-bottom-color: darken($colors.light-grey, 5%)
+
+ form.checkout
+ h3
+ color: $colors.headings
+ font-size: $font-size-medium
+
+ #ship-to-different-address
+ font-size: inherit
+ color: inherit
+
//=============
// Quantity input -/+ buttons
.qib-button
+ position: relative
text-align: center
-
-// Checkout
-form.checkout
- h3
- color: $colors.headings
- font-size: $font-size-medium
-
-#ship-to-different-address
- font-size: inherit
- color: inherit
+ color: transparent !important // Hide +/- characters so they can be replaced by better versions
+ user-select: none
+
+ &:before, &:after
+ content: ''
+ position: absolute
+ top: 50%
+ left: 50%
+ transform: translate(-50%, -50%)
+ background-color: #444
+
+ &:before
+ height: 1px
+ width: 0.75em
+
+ &:after
+ height: 0.75em
+ width: 1px
+
+ &.minus:after
+ display: none
+
+ &:hover
+ &:before, &:after
+ background-color: #000
//=============