|
119 | 119 | } |
120 | 120 | } |
121 | 121 |
|
122 | | -// ------------------------------------------------------------ |
123 | | -// Search results dropdown |
124 | | -// ------------------------------------------------------------ |
125 | | -.search-results { |
126 | | - position: absolute; |
127 | | - left: 0; |
128 | | - display: none; |
129 | | - width: 100%; |
130 | | - max-height: calc(100% - #{$sp-10}); |
131 | | - overflow-y: auto; |
132 | | - padding: $sp-1 $sp-2; |
133 | | - border-bottom-right-radius: $border-radius; |
134 | | - border-bottom-left-radius: $border-radius; |
135 | | - |
136 | | - @include mq(md) { |
137 | | - top: 100%; |
138 | | - max-height: calc(100vh - 200%) !important; |
139 | | - padding-left: 3rem; |
140 | | - } |
141 | | -} |
142 | | - |
143 | | -.search-results-list { |
144 | | - padding-left: 0; |
145 | | - margin-bottom: $sp-1; |
146 | | - list-style: none; |
147 | | - background-color: $body-background-color; |
148 | | - outline: 1px solid $border-color; |
149 | | - outline-offset: -1px; |
150 | | -} |
151 | | - |
152 | 122 | // ------------------------------------------------------------ |
153 | 123 | // Full search results page |
154 | 124 | // ------------------------------------------------------------ |
|
176 | 146 | } |
177 | 147 | } |
178 | 148 |
|
179 | | -// ------------------------------------------------------------ |
180 | | -// Individual search result listing |
181 | | -// ------------------------------------------------------------ |
182 | | -.search-results-list-item { |
183 | | - padding: 0; |
184 | | - margin: 0; |
185 | | - font-size: var(--text-font-size-sm); |
186 | | -} |
187 | | - |
188 | | -.search-result { |
189 | | - display: block; |
190 | | - padding: $sp-1 $sp-3; |
191 | | - |
192 | | - &:hover, |
193 | | - &.active { |
194 | | - background-color: $feedback-color; |
195 | | - } |
196 | | -} |
197 | | - |
198 | | -.search-result-title { |
199 | | - display: block; |
200 | | - padding: $sp-2 0; |
201 | | - |
202 | | - @include mq(sm) { |
203 | | - display: inline-block; |
204 | | - padding-right: $sp-2; |
205 | | - vertical-align: top; |
206 | | - } |
207 | | -} |
208 | | - |
209 | | -// ------------------------------------------------------------ |
210 | | -// Document name + icon |
211 | | -// ------------------------------------------------------------ |
212 | | -.search-result-doc { |
213 | | - display: flex; |
214 | | - align-items: center; |
215 | | - word-wrap: break-word; |
216 | | - |
217 | | - .search-result-icon { |
218 | | - width: $sp-4; |
219 | | - height: $sp-4; |
220 | | - margin-right: $sp-2; |
221 | | - color: $link-color; |
222 | | - flex-shrink: 0; |
223 | | - } |
224 | | - |
225 | | - .search-result-doc-title { |
226 | | - overflow: auto; |
227 | | - font-weight: 700; |
228 | | - } |
229 | | -} |
230 | | - |
231 | | -// ------------------------------------------------------------ |
232 | | -// Section title |
233 | | -// ------------------------------------------------------------ |
234 | | -.search-result-section { |
235 | | - margin-left: #{$sp-4 + $sp-2}; |
236 | | - word-wrap: break-word; |
237 | | -} |
238 | | - |
239 | | -.search-result-rel-url { |
240 | | - display: block; |
241 | | - margin-left: #{$sp-4 + $sp-2}; |
242 | | - overflow: hidden; |
243 | | - color: $search-result-preview-color; |
244 | | - text-overflow: ellipsis; |
245 | | - white-space: nowrap; |
246 | | -} |
247 | | - |
248 | | -// ------------------------------------------------------------ |
249 | | -// Search previews (disabled for now) |
250 | | -// ------------------------------------------------------------ |
251 | | -.search-result-previews { |
252 | | - display: none; |
253 | | - padding: $sp-2 0 $sp-2 $sp-4; |
254 | | - margin-left: $sp-2; |
255 | | - color: $search-result-preview-color; |
256 | | - word-wrap: break-word; |
257 | | - border-left: $border; |
258 | | - border-left-color: $border-color; |
259 | | - |
260 | | - @include mq(sm) { |
261 | | - width: 60%; |
262 | | - padding-left: $sp-2; |
263 | | - margin-left: 0; |
264 | | - vertical-align: top; |
265 | | - } |
266 | | -} |
267 | | - |
268 | | -.search-result-preview + .search-result-preview { |
269 | | - margin-top: $sp-1; |
270 | | -} |
271 | | - |
272 | 149 | .search-result-highlight { |
273 | 150 | font-weight: normal; |
274 | 151 | } |
275 | 152 |
|
276 | | -.search-no-result { |
277 | | - padding: $sp-2 $sp-3; |
278 | | -} |
279 | | - |
280 | 153 | // ------------------------------------------------------------ |
281 | 154 | // Floating search button |
282 | 155 | // ------------------------------------------------------------ |
|
293 | 166 | align-items: center; |
294 | 167 | justify-content: center; |
295 | 168 | } |
296 | | - |
297 | | -// ------------------------------------------------------------ |
298 | | -// Search overlay |
299 | | -// ------------------------------------------------------------ |
300 | | -.search-overlay { |
301 | | - position: fixed; |
302 | | - top: 0; |
303 | | - left: 0; |
304 | | - z-index: 1; |
305 | | - width: 0; |
306 | | - height: 0; |
307 | | - background-color: rgba(0, 0, 0, 0.3); |
308 | | - opacity: 0; |
309 | | - transition: |
310 | | - opacity ease $transition-duration, |
311 | | - width 0s $transition-duration, |
312 | | - height 0s $transition-duration; |
313 | | -} |
314 | | - |
315 | | -// ------------------------------------------------------------ |
316 | | -// Search-active state |
317 | | -// ------------------------------------------------------------ |
318 | | -.search-active { |
319 | | - .search { |
320 | | - position: fixed; |
321 | | - top: 0; |
322 | | - left: 0; |
323 | | - width: 100%; |
324 | | - height: 100%; |
325 | | - background-color: var(--color-neutral-inverse-bg-document); |
326 | | - |
327 | | - @include mq(md) { |
328 | | - background-color: var(--color-neutral-bg-document); |
329 | | - } |
330 | | - } |
331 | | - |
332 | | - .search-input-wrap { |
333 | | - height: $sp-10; |
334 | | - border-radius: 0; |
335 | | - |
336 | | - @include mq(md) { |
337 | | - width: $search-results-width; |
338 | | - } |
339 | | - } |
340 | | - |
341 | | - .search-input { |
342 | | - background-color: var(--color-neutral-bg-document); |
343 | | - } |
344 | | - |
345 | | - .search-results { |
346 | | - display: block; |
347 | | - } |
348 | | - |
349 | | - .search-no-result { |
350 | | - background-color: var(--color-neutral-bg-document); |
351 | | - } |
352 | | - |
353 | | - .search-overlay { |
354 | | - width: 100%; |
355 | | - height: 100%; |
356 | | - opacity: 1; |
357 | | - transition: |
358 | | - opacity ease $transition-duration, |
359 | | - width 0s, |
360 | | - height 0s; |
361 | | - } |
362 | | - |
363 | | - @include mq(md) { |
364 | | - .main { |
365 | | - position: fixed; |
366 | | - right: 0; |
367 | | - left: 0; |
368 | | - } |
369 | | - } |
370 | | - |
371 | | - .main-header { |
372 | | - padding-top: $sp-10; |
373 | | - |
374 | | - @include mq(md) { |
375 | | - padding-top: 0; |
376 | | - } |
377 | | - } |
378 | | -} |
0 commit comments