This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
/
style.scss
137 lines (118 loc) · 2.61 KB
/
style.scss
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.wc-block-components-checkbox {
@include reset-color();
@include reset-typography();
margin-top: em($gap);
label {
align-items: flex-start;
display: flex;
position: relative;
cursor: pointer;
@include font-size(small);
input[type="checkbox"] {
cursor: inherit;
}
}
.wc-block-components-checkbox__input[type="checkbox"] {
font-size: 1em;
appearance: none;
border: 2px solid $input-border-gray;
border-radius: 2px;
box-sizing: border-box;
height: em(24px);
width: em(24px);
margin: 0;
margin-right: em($gap);
min-height: em(24px);
min-width: em(24px);
overflow: hidden;
position: static;
vertical-align: middle;
background-color: #fff;
&:checked {
background: #fff;
border-color: $input-border-gray;
}
&:focus {
outline: 2px solid $input-border-gray;
outline-offset: 2px;
}
&::before,
&::after {
content: "";
}
&:not(:checked) + .wc-block-components-checkbox__mark {
display: none;
}
.has-dark-controls & {
border-color: $controls-border-dark;
background-color: $input-background-dark;
&:checked {
background: $input-background-dark;
border-color: $controls-border-dark;
}
&:focus {
outline: 2px solid $controls-border-dark;
outline-offset: 2px;
}
}
}
&.has-error {
color: $alert-red;
a {
color: $alert-red;
}
.wc-block-components-checkbox__input {
&,
&:hover,
&:focus,
&:active {
border-color: $alert-red;
}
&:focus {
outline: 2px solid $alert-red;
outline-offset: 2px;
}
}
}
.wc-block-components-checkbox__mark {
fill: #000;
position: absolute;
margin-left: em(3px);
margin-top: em(1px);
width: em(18px);
height: em(18px);
pointer-events: none;
.has-dark-controls & {
fill: #fff;
}
}
> span,
.wc-block-components-checkbox__label {
vertical-align: middle;
line-height: em(24px);
}
}
// Hack to hide the check mark in IE11
// See comment: https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/2320/#issuecomment-621936576
@include ie11() {
.wc-block-components-checkbox__mark {
display: none;
}
}
.theme-twentytwentyone {
.wc-block-components-checkbox__input[type="checkbox"],
.has-dark-controls .wc-block-components-checkbox__input[type="checkbox"] {
background-color: #fff;
border-color: var(--form--border-color);
position: relative;
}
.wc-block-components-checkbox__input[type="checkbox"]:checked,
.has-dark-controls
.wc-block-components-checkbox__input[type="checkbox"]:checked {
background-color: #fff;
border-color: var(--form--border-color);
}
.wc-block-components-checkbox__mark {
display: none;
}
}