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 218
/
style.scss
208 lines (172 loc) · 3.91 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
.woocommerce-search-list {
width: 100%;
padding: 0 0 $gap;
text-align: left;
}
.woocommerce-search-list__selected {
margin: $gap 0;
padding: $gap 0 0;
// 76px is the height of 1 row of tags.
min-height: 76px;
border-top: 1px solid $core-grey-light-500;
.woocommerce-search-list__selected-header {
margin-bottom: $gap-smaller;
button {
margin-left: $gap-small;
}
}
.woocommerce-tag__text {
max-width: 13em;
}
}
.woocommerce-search-list__search {
margin: $gap 0;
padding: $gap 0 0;
border-top: 1px solid $core-grey-light-500;
.components-base-control__field {
margin-bottom: $gap;
}
}
.woocommerce-search-list__list {
padding: 0;
max-height: 17em;
overflow-x: hidden;
overflow-y: auto;
border-top: 1px solid $core-grey-light-500;
border-bottom: 1px solid $core-grey-light-500;
&.is-loading {
padding: $gap-small 0;
text-align: center;
border: none;
}
&.is-not-found {
padding: $gap-small 0;
text-align: center;
border: none;
.woocommerce-search-list__not-found-icon,
.woocommerce-search-list__not-found-text {
display: inline-block;
}
.woocommerce-search-list__not-found-icon {
margin-right: $gap;
.gridicon {
vertical-align: top;
margin-top: -1px;
}
}
}
.components-spinner {
float: none;
margin: 0 auto;
}
.components-menu-group__label {
@include visually-hidden;
}
& > [role="menu"] {
border: 1px solid $core-grey-light-500;
border-bottom: none;
}
.woocommerce-search-list__item {
display: flex;
align-items: center;
margin-bottom: 0;
padding: $gap-small $gap;
background: $white;
// !important to keep the border around on hover
border-bottom: 1px solid $core-grey-light-500 !important;
color: $core-grey-dark-500;
@include hover-state {
background: $core-grey-light-100;
}
&:last-child {
border-bottom: none !important;
}
.woocommerce-search-list__item-state {
flex: 0 0 16px;
margin-right: $gap-smaller;
// Set an explicit height to ensure vertical alignment
height: 24px;
}
.woocommerce-search-list__item-label {
display: flex;
flex: 1;
}
&.depth-0 + .depth-1 {
// Hide the border on the preceding list item
margin-top: -1px;
}
&:not(.depth-0) {
border-bottom: 0 !important;
}
&:not(.depth-0) + .depth-0 {
border-top: 1px solid $core-grey-light-500;
}
// Anything deeper than 5 levels will use this fallback depth
&[class*="depth-"] .woocommerce-search-list__item-label:before {
margin-right: $gap-smallest;
content: repeat( '— ', 5 );
}
&.depth-0 .woocommerce-search-list__item-label:before {
margin-right: 0;
content: '';
}
@for $i from 1 to 5 {
&.depth-#{$i} .woocommerce-search-list__item-label:before {
content: repeat( '— ', $i );
}
}
.woocommerce-search-list__item-name {
display: inline-block;
}
.woocommerce-search-list__item-prefix {
display: none;
color: $core-grey-dark-300;
}
&.is-searching,
&.is-skip-level {
.woocommerce-search-list__item-label {
// Un-flex the label, so the prefix (breadcrumbs) and name are aligned.
display: inline-block;
}
.woocommerce-search-list__item-prefix {
display: inline;
&:after {
margin-right: $gap-smallest;
content: " ›";
}
}
}
&.is-searching {
.woocommerce-search-list__item-name {
color: $core-grey-dark-900;
}
}
.woocommerce-search-list__item-count {
flex: 0;
padding: $gap-smallest/2 $gap-smaller;
border: 1px solid $core-grey-light-500;
border-radius: 12px;
font-size: 0.8em;
line-height: 1.4;
color: $core-grey-dark-300;
background: $white;
}
}
}
.components-panel {
.woocommerce-search-list {
padding: 0;
}
.woocommerce-search-list__selected {
margin: 0 0 $gap;
padding: 0;
border-top: none;
// 54px is the height of 1 row of tags in the sidebar.
min-height: 54px;
}
.woocommerce-search-list__search {
margin: 0 0 $gap;
padding: 0;
border-top: none;
}
}