|
1 | 1 | // stylelint-disable selector-class-pattern |
2 | 2 |
|
3 | | -.docs-search { |
4 | | - position: relative; |
5 | | - width: 100%; |
6 | | - |
7 | | - @include media-breakpoint-up(lg) { |
8 | | - position: absolute; |
9 | | - top: .875rem; |
10 | | - left: 50%; |
11 | | - width: 200px; |
12 | | - margin-left: -100px; |
13 | | - } |
14 | | - |
15 | | - @include media-breakpoint-up(xl) { |
16 | | - width: 280px; |
17 | | - margin-left: -140px; |
18 | | - } |
19 | | - |
20 | | -} |
21 | | - |
22 | 3 | .DocSearch-Container { |
23 | 4 | --docsearch-muted-color: #{$text-muted}; |
24 | 5 | --docsearch-hit-shadow: none; |
25 | 6 |
|
26 | | - z-index: 1030; |
| 7 | + z-index: 2000; // Make sure to be over all components showcased in the documentation |
| 8 | + cursor: auto; // Needed because of [role="button"] in Algolia search modal. Remove once https://github.com/algolia/docsearch/issues/1370 is tackled. |
27 | 9 |
|
28 | 10 | @include media-breakpoint-up(lg) { |
29 | 11 | padding-top: 4rem; |
30 | 12 | } |
31 | 13 | } |
32 | 14 |
|
33 | 15 | .DocSearch-Button { |
34 | | - --docsearch-searchbox-background: #{rgba($black, .1)}; |
35 | | - --docsearch-searchbox-color: #{$white}; |
36 | | - --docsearch-searchbox-focus-background: #{rgba($black, .25)}; |
37 | | - --docsearch-searchbox-shadow: #{0 0 0 .25rem rgba($bd-accent, .4)}; |
38 | | - --docsearch-text-color: #{$white}; |
39 | | - --docsearch-muted-color: #{rgba($white, .65)}; |
40 | | - |
41 | | - width: 100%; |
42 | | - height: 38px; // Match Bootstrap inputs |
43 | | - margin: 0; |
44 | | - border: 1px solid rgba($white, .4); |
45 | | - @include border-radius(.375rem); |
46 | | - |
47 | | - .DocSearch-Search-Icon { |
48 | | - opacity: .65; |
| 16 | + min-width: 200px; |
| 17 | + min-height: 38px; |
| 18 | + font-family: $input-font-family; |
| 19 | + font-weight: $input-font-weight; |
| 20 | + line-height: $input-line-height; |
| 21 | + @include font-size($input-font-size); |
| 22 | + color: $input-color; |
| 23 | + background-color: $input-bg; |
| 24 | + background-clip: padding-box; |
| 25 | + border: $input-border-width solid $input-border-color; |
| 26 | + |
| 27 | + // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS. |
| 28 | + @include border-radius($btn-border-radius); |
| 29 | + |
| 30 | + @include box-shadow($input-box-shadow); |
| 31 | + @include transition($input-transition); |
| 32 | + |
| 33 | + &:focus { |
| 34 | + color: $input-focus-color; |
| 35 | + background-color: $input-focus-bg; |
| 36 | + border-color: $input-focus-border-color; |
| 37 | + outline: 0; |
| 38 | + @if $enable-shadows { |
| 39 | + @include box-shadow($input-box-shadow, $input-focus-box-shadow); |
| 40 | + } @else { |
| 41 | + // Avoid using mixin so we can pass custom focus shadow properly |
| 42 | + box-shadow: $input-focus-box-shadow; |
| 43 | + } |
49 | 44 | } |
50 | 45 |
|
51 | | - &:active, |
52 | | - &:focus, |
53 | | - &:hover { |
54 | | - border-color: rgba($bd-accent, 1); |
| 46 | + &:hover:not(:disabled):not([readonly])::file-selector-button { |
| 47 | + background-color: $form-file-button-hover-bg; |
| 48 | + } |
55 | 49 |
|
56 | | - .DocSearch-Search-Icon { |
57 | | - opacity: 1; |
58 | | - } |
| 50 | + .DocSearch-Search-Icon { |
| 51 | + opacity: .65; |
59 | 52 | } |
60 | 53 | } |
61 | 54 |
|
| 55 | + |
62 | 56 | .DocSearch-Button-Keys { |
63 | 57 | min-width: 0; |
64 | | - padding: .125rem .25rem; |
65 | | - background: rgba($black, .25); |
| 58 | + padding: 0 .25rem; |
| 59 | + background: rgba($black, .125); |
66 | 60 | @include border-radius(.25rem); |
67 | 61 | } |
68 | 62 |
|
69 | 63 | .DocSearch-Button-Key { |
70 | 64 | top: 0; |
71 | 65 | width: auto; |
72 | | - height: 1.25rem; |
73 | | - padding-right: .125rem; |
74 | | - padding-left: .125rem; |
| 66 | + height: 1.5rem; |
| 67 | + padding: 0 .125rem; |
75 | 68 | margin-right: 0; |
76 | 69 | font-size: .875rem; |
77 | 70 | background: none; |
|
0 commit comments