Files
torebki-fabiola.pl/wp-content/themes/dotspice/scss/_woo-cart.scss
2026-03-05 13:07:40 +01:00

450 lines
12 KiB
SCSS

@import 'variables', 'mixin';
/**
* Table of Contents:
* 1.0 - shop_table
* 1.1 - shop_table.cart
* 1.1.1 - product-remove
* 1.1.2 - product-thumbnail
* 1.1.3 - product-name
* 1.1.4 - product-quantity
* 1.1.5 - product-subtotal
* 1.2 - shop_table.cart mobile
* 1.3 - actions
* 2.0 - cart_totals
* 2.1 - shop_table
* 2.2 - woocommerce-shipping-calculator
* 2.3 - wc-proceed-to-checkout
*/
.senddate_parent,
.fixform_parent {
display: none !important;
}
.woocommerce {
.alert {
position: relative;
padding: 2rem 2rem 2rem 5.5rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0;
&:before {
content: "!";
font-weight: bold;
@include absolute(0, auto, 0, 2rem);
font-size: 80px;
align-items: center;
display: flex;
}
p {
margin: 0;
color: #000;
}
&-info {
color: $primary-color;
background-color: rgba($primary-color, 50%);
border-color: $primary-color;
a {
@extend %link-color;
}
}
&-heading {
margin: 0;
padding-bottom: 5px;
font-size: 20px;
}
}
.calculated_shipping {
h2 {
color: #000000;
font-family: 'gilroy-regular', sans-serif;
margin-bottom: 30px;
margin-top: 50px;
font-size: 30px;
line-height: 30px;
text-align: center;
}
}
.woocommerce-cart-form,
.cart-collaterals {
.shop_table {
border-color: #D7D7D7;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border: 1px solid #d7d7d7;
}
}
}
.woocommerce-mini-cart__buttons .button {
font-size: 11px;
margin-top: 10px;
padding: 10px;
letter-spacing: 0;
border: 0;
text-transform: none;
white-space: unset;
text-align: left;
min-height: auto;
color: #666666;
position: relative;
background: transparent;
font-weight: 400;
line-height: inherit;
}
/* 1.0 - shop_table */
.shop_table {
width: 100%;
th {
font-weight: $woo-bold-font-weight;
}
th,
td {
border-width: 0 0 1px 0;
border-style: solid;
border-color: $woo-border-color;
}
p,
label,
ul,
ol {
margin: 0;
list-style: none;
padding: 0;
}
/* 1.1 - shop_table.cart */
&.cart {
margin: 20px 0 20px !important;
tr:not(:last-child) {
@include css3(transition, $transition);
&:nth-child(even) {
background: $woo-table-row-odd-background;
}
&:hover {
background-color: $woo-table-row-hover-background;
}
}
th,
td {
vertical-align: middle;
padding: 10px;
}
/* 1.1.1 - product-remove */
.product-remove {
width: 38px;
padding: 0;
text-align: right;
position: relative;
a {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
text-align: center;
font-size: 30px;
-webkit-box-sizing: content-box;
box-sizing: content-box;
color: $red;
text-decoration: none;
@include css3(transition, 0.3s);
@include absolute(0, 0, 0, 0);
&:hover {
text-decoration: none;
background: $red;
color: #fff;
}
}
}
/* 1.1.2 - product-thumbnail */
.product-thumbnail {
width: 250px;
height: 250px;
min-width: 250px;
position: relative;
img {
object-fit: cover;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
}
/* 1.1.3 - product-name */
.product-name {
min-width: 220px;
padding: 30px;
a {
font-family: $header-font-family;
color: $header-color;
font-weight: $body-font-weight;
font-size: 25px;
@extend %link-color;
}
.variation {
margin: 0;
font-size: 90%;
line-height: 1.6;
margin-top: 10px;
dt {
display: inline;
font-weight: $woo-bold-font-weight;
&:before {
content: ' ';
display: block;
}
}
dd {
margin-bottom: 0;
p {
display: inline;
}
}
}
}
/* 1.1.4 - product-quantity */
.product-quantity {
width: 205px;
.quantity-buttons {
flex-direction: row-reverse;
}
.quantity {
float: left;
}
}
/* 1.1.5 - product-subtotal */
.product-subtotal {
font-weight: $woo-bold-font-weight;
}
/* 1.2 - shop_table.cart mobile */
@include media-max(md) {
thead {
display: none
}
tr {
display: block;
position: relative;
border: 1px solid $woo-border-color;
+tr {
margin-top: 30px;
}
td {
display: flex;
justify-content: space-between;
align-items: center;
text-align: right;
@include media-max(1200px) {
flex-direction: column;
text-align: left;
}
&:before {
content: attr(data-title) ": ";
font-weight: $woo-bold-font-weight;
text-align: left;
margin-right: 15px;
flex-grow: 1;
}
&.product-remove {
width: 28px;
height: 28px;
@include absolute(10px, auto, auto, 10px);
@include clear-pseudo;
a {
background: $red;
color: #FFFFFF;
&:hover {
background: #FFFFFF;
color: $red;
}
}
}
&.product-thumbnail {
width: 100%;
justify-content: center;
@include clear-pseudo;
}
&.product-quantity {
width: 100%;
@include media-max(1200px) {
flex-direction: row;
align-items: center;
}
.product-price__box {
justify-content: flex-end;
}
}
&.product-subtotal {
border: 0;
}
}
}
}
}
/* 1.3 - actions */
.actions {
&:before {
content: none !important;
}
@include media-max(md) {
flex-wrap: wrap;
justify-content: center;
}
.coupon {
display: flex;
float: left;
@include media-max(md) {
float: none;
width: 100%;
}
@include media-max(sm) {
flex-wrap: wrap;
}
label {
display: none;
}
}
input {
margin: 5px;
}
.button {
white-space: nowrap;
margin: 5px;
float: right;
@include media-max(md) {
float: none;
}
}
}
}
/* 2.0 - cart_totals */
.cart_totals {
>h2 {
margin-top: 80px;
color: #000000;
font-family: 'gilroy-regular', sans-serif;
margin-bottom: 30px;
margin-top: 50px;
font-size: 30px;
line-height: 30px;
text-align: center;
}
/* 2.1 - shop_table */
.shop_table {
@include media-max(md) {
display: block;
tbody {
display: block;
}
tr {
display: block;
border-bottom: 1px solid $border-color;
}
td,
th {
display: block;
border-bottom-width: 0 !important;
}
th {
padding-bottom: 0 !important;
}
}
}
/* 2.2 - woocommerce-shipping-calculator */
.shipping-calculator-form {
padding: 15px 0;
.form-row {
margin: $paragraph-margin;
}
}
/* 2.3 - wc-proceed-to-checkout */
.wc-proceed-to-checkout {
margin: $header-margin;
text-align: right;
}
}