Skip to content

Commit 3555276

Browse files
committed
fixup some search box styles & cleanup css
1 parent 66ba3d6 commit 3555276

File tree

1 file changed

+26
-62
lines changed

1 file changed

+26
-62
lines changed

src/css/docs.css

Lines changed: 26 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
--ifm-navbar-link-color: var(--ifm-color-white);
2828
--ifm-navbar-link-hover-color: var(--ifm-color-white);
2929
--ifm-navbar-link-hover-decoration: underline;
30-
/* Search */
30+
/* Plugin(?) Search */
3131
--ifm-navbar-search-input-background-color: var(--ifm-color-primary-darkest);
3232
--ifm-navbar-search-input-color: var(--ifm-color-white);
3333
--ifm-navbar-search-input-placeholder-color: var(--ifm-color-white);
@@ -170,29 +170,39 @@ table tr td + td + td:last-child {
170170
border-radius: var(--ifm-global-radius);
171171
}
172172

173-
/* Search */
174-
.DocSearch.DocSearch-Button {
175-
width: 12.5rem;
173+
/* Navbar search */
174+
.navbar__items .DocSearch-Button {
176175
height: 2.25rem;
177176
font-size: 1rem;
178-
border-radius: 0;
179-
color: #ffffff;
180-
background-color: #9a2829;
177+
border-radius: var(--ifm-global-radius);
178+
color: var(--ifm-color-white);
179+
background-color: var(--ifm-color-primary-darkest);
181180
font-family: var(--ifm-font-family-base);
182181
}
183-
.DocSearch.DocSearch-Button:hover {
184-
background-color: #9a2829;
185-
color: #ffffff;
186-
height: 2.25rem;
182+
.navbar__items .DocSearch-Button:active,
183+
.navbar__items .DocSearch-Button:focus,
184+
.navbar__items .DocSearch-Button:hover {
185+
color: var(--ifm-color-primary-darkest);
187186
}
188187
.navbar__items .DocSearch-Button .DocSearch-Search-Icon {
189188
width: 1rem;
190189
height: 1rem;
191-
color: #ffffff;
190+
color: var(--ifm-color-white);
191+
}
192+
.navbar__items .DocSearch-Button:active .DocSearch-Search-Icon ,
193+
.navbar__items .DocSearch-Button:focus .DocSearch-Search-Icon ,
194+
.navbar__items .DocSearch-Button:hover .DocSearch-Search-Icon {
195+
color: var(--ifm-color-primary-darkest);
192196
}
193197
.DocSearch .DocSearch-Button-Keys {
194198
display: none;
195199
}
200+
/* More qualifiers than built-in styles */
201+
.DocSearch-Modal .DocSearch-Form,
202+
.DocSearch-Modal .DocSearch-Hit,
203+
.DocSearch-Modal .DocSearch-Hit a {
204+
border-radius: var(--ifm-global-radius);
205+
}
196206

197207
/* Footer (for logo) */
198208
.footer__col:first-of-type .footer__item {
@@ -208,43 +218,16 @@ table tr td + td + td:last-child {
208218
}
209219
}
210220

211-
/* Tons of hacks for the algolia search to look good on mobile */
212221
@media only screen and (max-width: 600px) {
213-
.DocSearch.DocSearch-Button {
222+
.navbar__items .DocSearch-Button {
214223
width: 100%;
215224
margin: 0;
216-
height: 2.25rem;
217-
font-size: 1rem;
218-
border-radius: 0;
219-
color: #ffffff;
220-
background-color: #9a2829;
221-
font-family: var(--ifm-font-family-base);
222225
}
223-
span.DocSearch-Button-Placeholder {
226+
.navbar__items .DocSearch-Button-Placeholder {
224227
display: block;
225228
}
226-
.navbar .navbar__search {
227-
width: 100%;
228-
}
229-
.search-icon-hidden {
230-
display: none !important;
231-
}
232-
.navbar .navbar__search .navbar__search-input {
233-
width: 100% !important;
234-
}
235-
236-
.navbar .algolia-autocomplete {
237-
width: 100%;
238-
display: block;
239-
}
240-
.navbar .algolia-autocomplete .ds-dropdown-menu {
241-
position: absolute !important;
242-
right: 0.5rem !important;
243-
max-width: calc(100% - 1rem);
244-
}
245229
}
246230

247-
/* TODO: These will need to be update when "Enterprise" is added */
248231
@media only screen and (max-width: 767px) {
249232
.navbar .navbar__inner {
250233
display: block;
@@ -256,31 +239,17 @@ table tr td + td + td:last-child {
256239
justify-content: space-around;
257240
flex-wrap: wrap;
258241
}
259-
260-
/* .navbar .navbar__items.navbar__items--right {
261-
justify-content: space-around;
262-
} */
263-
264-
.navbar .navbar__search {
265-
padding-left: 0;
266-
}
267242
}
268243

269244
@media only screen and (min-width: 768px) {
270-
.navbar .navbar__search .navbar__search-input {
245+
.navbar__items .DocSearch-Button {
271246
width: 9.5rem;
272247
}
273248
}
274249

275250
@media only screen and (min-width: 996px) {
276-
.navbar .navbar__search .navbar__search-input {
251+
.navbar .DocSearch-Button {
277252
width: 12.5rem;
278-
transition: width 0.5s ease 0s;
279-
}
280-
281-
.navbar .navbar__search .navbar__search-input:active,
282-
.navbar .navbar__search .navbar__search-input:focus {
283-
width: 16.5rem;
284253
}
285254
}
286255

@@ -331,8 +300,3 @@ table tr td + td + td:last-child {
331300
box-shadow: 6px 6px 0 0 var(--ifm-color-secondary);
332301
transition: box-shadow 0.1s ease-in, transform 0.1s ease-in;
333302
}
334-
335-
/* Fix: show "Copy to clipboard" button */
336-
button.copyButton_node_modules-\@docusaurus-theme-classic-src-theme-CodeBlock- {
337-
color: var(--ifm-color-white);
338-
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy