_woocommerce.scss
2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Fix billing field wrapper
.woocommerce-input-wrapper {
width: 100%;
}
// Woocommerce product gallery slider width fix
figure.woocommerce-product-gallery__wrapper {
max-width: inherit !important;
}
// Fix coupon code input width for cart, apply only to the cart as it will break the checkout field width
@media(min-width: 768px) {
.woocommerce-cart #coupon_code.input-text {
width: 110px !important;
}
}
// Fix input fields for Stripe Checkout fields
#stripe-payment-data {
#wc-stripe-cc-form {
.form-row {
display: flex;
flex-direction: column;
.wc-stripe-elements-field {
max-height: 2rem;
}
}
}
.woocommerce-SavedPaymentMethods-saveNew {
display: inherit;
}
}
.woocommerce-notices-wrapper .woocommerce-message {
@extend .alert;
@extend .alert-success;
padding: 1em 2em 1em 3.5em;
a.button {
@extend .btn;
@extend .btn-success;
}
&.woocommerce-error {
@extend .alert-danger;
a.button {
@extend .btn-danger;
}
}
}
.woocommerce-info {
@extend .alert;
@extend .alert-info;
padding: 1em 2em 1em 3.5em;
a.button {
@extend .btn;
@extend .btn-info;
}
}
// Accessibility - update color for required class
.woocommerce form .form-row .required {
color: $danger;
}
.woocommerce form .form-row label {
// Override WooCommerce default styles.
@if variable-exists('bootstrap4') {
&.custom-control-label {
line-height: inherit;
}
} @else {
&.form-check-label {
line-height: inherit;
}
}
}
@if not variable-exists('bootstrap4') {
// Override WooCommerce default styles.
.woocommerce form .form-row .checkbox {
&.form-check {
display: block;
line-height: inherit;
}
}
.woocommerce form .form-row .input-checkbox {
&.form-check-input {
$top: ($line-height-base - $form-check-input-width) * .5;
$left: $form-check-padding-start * -1;
margin: $top 0 0 $left
}
}
}
// Accessibility requirement for color contrast
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce div.product .stock,
.woocommerce ul.products li.product .price,
#add_payment_method .cart-collaterals .cart_totals .discount td,
.woocommerce-cart .cart-collaterals .cart_totals .discount td,
.woocommerce-checkout .cart-collaterals .cart_totals .discount td {
color: $green;
}
.woocommerce-page form .show-password-input {
top: initial;
}