|
1 |
| -/*! https://github.com/jquery/typesense-minibar 1.1.1 */ |
| 1 | +/*! https://github.com/jquery/typesense-minibar 1.2.0 */ |
2 | 2 | .tsmb-form {
|
3 | 3 | --tsmb-size-edge: 1px;
|
4 | 4 | --tsmb-size-radius: 3px;
|
|
7 | 7 | --tsmb-size-sm: 0.8rem;
|
8 | 8 | --tsmb-size-half: calc(var(--tsmb-size-sm)/2);
|
9 | 9 | --tsmb-size-input: calc(var(--tsmb-size-base) * 1.2);
|
| 10 | + --tsmb-size-listbox-right: auto; |
| 11 | + --tsmb-size-listbox-width: calc(min(30rem, 60vw)); |
| 12 | + --tsmb-size-listbox-max-height: 70vh; |
10 | 13 |
|
11 | 14 | --tsmb-color-base-background: #fff;
|
12 | 15 | --tsmb-color-base30: #333;
|
|
51 | 54 | .tsmb-form:focus-within {
|
52 | 55 | color: var(--tsmb-color-focus30);
|
53 | 56 | }
|
| 57 | + |
54 | 58 | .tsmb-form:focus-within input[type=search] {
|
55 | 59 | background: var(--tsmb-color-focus-background);
|
56 | 60 | }
|
| 61 | + |
57 | 62 | .tsmb-form:focus-within input[type=search]::placeholder {
|
58 | 63 | color: var(--tsmb-color-focus50);
|
59 | 64 | }
|
|
100 | 105 | display: block !important;
|
101 | 106 | }
|
102 | 107 |
|
| 108 | +.tsmb-form--slash::after { |
| 109 | + display: none; |
| 110 | +} |
| 111 | + |
103 | 112 | .tsmb-form--slash:not(.tsmb-form--open):not(:focus-within)::after {
|
104 | 113 | content: '/';
|
105 | 114 | display: inline-block;
|
|
122 | 131 | .tsmb-form [role=listbox] {
|
123 | 132 | position: absolute;
|
124 | 133 | z-index: 10;
|
125 |
| - |
| 134 | + right: var(--tsmb-size-listbox-right); |
126 | 135 | background: var(--tsmb-color-focus-background);
|
127 | 136 | color: var(--tsmb-color-focus30);
|
128 |
| - width: 100%; |
129 |
| - max-height: 70vh; |
| 137 | + margin-top: var(--tsmb-size-half); |
| 138 | + min-width: 100%; |
| 139 | + width: var(--tsmb-size-listbox-width); |
| 140 | + max-height: var(--tsmb-size-listbox-max-height); |
130 | 141 | overflow: auto;
|
131 | 142 | border: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
|
| 143 | + border-radius: var(--tsmb-size-radius); |
132 | 144 | box-shadow: 0 var(--tsmb-size-sm) 20px rgba(0,0,0,0.12);
|
133 | 145 | }
|
134 | 146 |
|
|
143 | 155 | text-decoration: none;
|
144 | 156 | border-left: var(--tsmb-size-highlight) solid transparent;
|
145 | 157 | }
|
| 158 | + |
146 | 159 | .tsmb-form:not([data-group=true]) [role=option]:not(:first-child) a {
|
147 | 160 | border-top: var(--tsmb-size-edge) solid var(--tsmb-color-focus90);
|
148 | 161 | }
|
| 162 | + |
149 | 163 | .tsmb-form[data-group=true] [role=option] a {
|
150 | 164 | margin: 0 var(--tsmb-size-base);
|
151 | 165 | padding: var(--tsmb-size-sm);
|
|
199 | 213 | box-shadow: 0 0 10px rgba(0,0,0,0.12);
|
200 | 214 | text-decoration: none;
|
201 | 215 | }
|
| 216 | + |
202 | 217 | .tsmb-foot::before {
|
203 | 218 | content: 'Search by';
|
204 | 219 | color: var(--tsmb-color-focus50);
|
205 | 220 | }
|
| 221 | + |
206 | 222 | .tsmb-foot::after {
|
207 | 223 | content: ' Typesense';
|
208 | 224 | color: #0300b0;
|
209 | 225 | }
|
210 |
| - |
211 |
| -@media (max-width: 480px) { |
212 |
| - .tsmb-form { |
213 |
| - width: 100%; |
214 |
| - } |
215 |
| - |
216 |
| - .tsmb-form input[type=search] { |
217 |
| - border-radius: 0; |
218 |
| - } |
219 |
| -} |
220 |
| - |
221 |
| -@media (min-width: 768px) { |
222 |
| - .tsmb-form [role=listbox] { |
223 |
| - border-radius: var(--tsmb-size-radius); |
224 |
| - min-width: 500px; |
225 |
| - margin-top: var(--tsmb-size-half); |
226 |
| - } |
227 |
| - |
228 |
| - .tsmb-form--slash::after { |
229 |
| - display: none; |
230 |
| - } |
231 |
| -} |
0 commit comments