-
Notifications
You must be signed in to change notification settings - Fork 3k
/
Copy path_search-bar.scss
270 lines (224 loc) · 6.42 KB
/
_search-bar.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
@import 'breakpoints';
@import 'colors';
@import 'fonts';
$color-appBG: $color-green-appBG;
$color-highlightBG: $color-green-highlightBG;
$color-highlightBG-hover: $color-green-highlightBG-hover;
$color-accent : $color-green400;
$color-borders: $color-green-borders;
$color-icons: $color-green-icons;
$color-text: $color-white;
$color-link: $color-blue300;
$color-link-hovered: $color-blue200;
$color-success: $color-green400;
$color-text-supporting: $color-light-gray-green;
$color-green-hover: $color-green-hover;
$color-gray-label: $color-gray-label;
.search-icon {
margin: auto 0px;
}
#sidebar-search {
background-color: $color-appBG;
width: 375px;
height: 100vh;
position: fixed;
display: block;
top: 0;
right: 0;
z-index: 2;
}
@media only screen and (max-width: $breakpoint-tablet) {
#sidebar-search {
width: 100%;
}
}
.searchbar-title-wrapper {
padding: 20px;
}
.search-title {
font-size: 17px;
padding-bottom: 20px;
}
#toggle-search-close {
margin: auto;
margin-left: 0px;
margin-right: 10px;
}
/* Sidebar Layer */
#sidebar-layer {
position: fixed;
/* Sit on top of the page content */
display: none;
/* Hidden by default */
width: 100%;
/* Full width (cover the whole page) */
height: 100%;
/* Full height (cover the whole page) */
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 1;
}
/* All gsc id & class are Google Search relate gcse_0 is the search bar parent & gcse_1 is the search result list parent */
#___gcse_0 {
margin-left: 20px;
}
/* This input is in #___gcse_0 search bar */
input#gsc-i-id1.gsc-input {
background-color: $color-appBG;
color: #E7ECE9;
font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji" !important;
}
/* These below #gsc-iw-id1, .gsc-input-box & .gsib_a are inner wrapper of search bar input */
#gsc-iw-id1 {
background-color: $color-appBG;
border-bottom: $color-borders 2px solid;
border-bottom-left-radius: 0px;
&:focus-within {
border-bottom: $color-accent 2px solid;
}
}
.gsc-input-box .gsib_a {
padding: 5px 9px 4px 0px;
}
.search-icon {
margin-left: auto;
}
/* This is the close icon on search bar */
.gsib_b .gsst_a .gscb_a {
color: $color-icons;
&:hover {
color: $color-text;
}
}
/* This is to manage hover on parent close icon and make it the same effect on close icon */
.gsst_a:hover {
.gscb_a {
color: $color-text !important;
}
}
/* Manage Google Search label animation */
input#gsc-i-id1:focus+label.search-label,
input#gsc-i-id1:valid+label.search-label,
input#gsc-i-id1:active+label.search-label {
transform: translateY(-100%) scale(0.80);
}
label.search-label {
display: block;
position: absolute;
margin-top: -20px;
font-size: 15px;
font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji";
transform: translateY(-50%);
left: 20px;
color: $color-gray-label;
transform-origin: left top;
user-select: none;
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1), top 500ms;
}
/* Hide the relevance, Ads, Branding, find more button & etc sections */
.gsc-above-wrapper-area,
.gsc-webResult.gsc-result .gsc-url-top,
.gsc-results-wrapper-visible .gsc-adBlock,
.gcsc-more-maybe-branding-root,
.gcsc-find-more-on-google-root {
display: none;
}
.gsc-control-cse {
background-color: $color-appBG;
border: $color-appBG;
font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif !important;
max-height: 80vh;
overflow-y: scroll;
-ms-overflow-style: none;
scrollbar-width: none;
}
/* Hide the scrollbar */
.gsc-control-cse::-webkit-scrollbar {
display: none;
}
.gs-title {
font-weight: bold;
}
/* Change the Google Search Button icon into Expensify icon button */
.gsc-search-button.gsc-search-button-v2 {
padding: 10px;
margin-top: -7px;
margin-left: 15px;
margin-right: 20px;
border-radius: 25px;
background-color: $color-green400;
cursor: pointer;
width: 40px;
height: 40px;
}
.gsc-search-button.gsc-search-button-v2:hover {
background-color: $color-green-hover;
}
.gsc-search-button.gsc-search-button-v2 svg {
fill: $color-text;
height: auto;
width: auto;
}
/* Change the path of the Google Search Button icon into Expensify icon */
.gsc-search-button.gsc-search-button-v2 svg path {
d: path('M8 1c3.9 0 7 3.1 7 7 0 1.4-.4 2.7-1.1 3.8l5.2 5.2c.6.6.6 1.5 0 2.1-.6.6-1.5.6-2.1 0l-5.2-5.2C10.7 14.6 9.4 15 8 15c-3.9 0-7-3.1-7-7s3.1-7 7-7zm0 3c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4z');
fill-rule: evenodd;
clip-rule: evenodd;
}
.gsc-resultsbox-visible .gsc-webResult .gsc-result {
border-bottom: none;
}
/* Change Font the Google Search result */
.gsc-control-cse .gsc-table-result {
font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif !important;
}
/* Change Font result Paragraph color */
.gsc-results .gs-webResult:not(.gs-no-results-result):not(.gs-error-result) .gs-snippet, .gs-fileFormatType {
color: $color-text;
}
/* Change the color of the Google Search Suggestion font */
.gs-spelling.gs-result {
color: $color-text;
}
/* Pagination related style */
.gsc-resultsbox-visible .gsc-results .gsc-cursor-box {
text-align: center;
}
.gsc-resultsbox-visible .gsc-results .gsc-cursor-box .gsc-cursor-page {
margin: 4px;
width: 28px;
height: 28px;
border-radius: 25px;
display: inline-block;
line-height: 2.5;
background-color: $color-accent;
font-weight: bold;
font-size: 11px;
}
/* Change the color & background of Google Search Pagination */
.gsc-cursor-next-page,
.gsc-cursor-final-page {
color: $color-text;
background-color: $color-appBG;
}
/* Change the color & background of Google Search Current Page */
.gsc-resultsbox-visible .gsc-results .gsc-cursor-box .gsc-cursor-page.gsc-cursor-current-page {
background-color: $color-accent;
color: $color-text;
&:hover {
text-decoration: none;
background-color: $color-accent;
}
}
/* Change the color & background of Google Search of Other Page */
.gsc-resultsbox-visible .gsc-results .gsc-cursor-box .gsc-cursor-page {
background-color: $color-button-background;
color: $color-text;
&:hover {
background-color: $color-button-hovered;
text-decoration: none;
}
}