Skip to content

Commit 6ad5425

Browse files
committed
chore: better search styles
1 parent 6713266 commit 6ad5425

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/css/custom.css

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
--ifm-heading-font-family: 'Nacelle', system-ui, -apple-system, sans-serif;
2121
--ifm-font-family-monospace: 'IBM Mono';
2222
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
23+
--ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" width="16px"><path d="M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z" /></svg>');
2324
}
2425

2526
/* For readability concerns, you should choose a lighter palette in dark mode. */
@@ -32,6 +33,7 @@
3233
--ifm-color-primary-lighter: #3e6ef0;
3334
--ifm-color-primary-lightest: #557ef2;
3435
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
36+
--ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,<svg fill="%23ebebeb99" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" width="16px"><path d="M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z" /></svg>');
3537
}
3638

3739
@media (min-width: 1536px) {
@@ -622,23 +624,28 @@ html[data-theme='dark'] {
622624
margin-right: auto;
623625
}
624626

625-
.navbarSearchContainer_Bca1 {
626-
margin-left: auto;
627-
margin-right: auto;
628-
}
629-
630627
.DocSearch-Button {
631628
width: 400px;
632629
}
633630
}
634631

635632
.navbar__search-input {
636633
width: 25rem;
637-
background-color: #fafafa;
638634
border: 1px solid #9e9e9e33 !important;
639635
border-radius: 0.5rem;
640636
}
641637

638+
[data-theme='dark'] .navbar__search-input {
639+
width: 25rem;
640+
background-color: var(--docsearch-searchbox-background);
641+
border: 1px solid #9e9e9e33 !important;
642+
}
643+
644+
[data-theme='dark'] .navbar__search-input::placeholder {
645+
color: rgb(235, 235, 235, 0.6);
646+
}
647+
648+
642649
.DocSearch-Button {
643650
border-radius: 0.5em !important;
644651
border-color: rgb(158 158 158 / 20%) !important;

0 commit comments

Comments
 (0)