Skip to content

Commit f9c931b

Browse files
committed
Tidy up the search results typography
1 parent e882d16 commit f9c931b

File tree

2 files changed

+22
-26
lines changed

2 files changed

+22
-26
lines changed

resources/css/search.css

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Algolia DocSearch Variables */
22
:root {
33
--docsearch-primary-color: rgb(84, 104, 255);
4-
--docsearch-text-color: rgb(28, 30, 33);
4+
--docsearch-text-color: theme('colors.gray.dark');
55
--docsearch-spacing: 12px;
66
--docsearch-icon-stroke-width: 1.4;
77
--docsearch-highlight-color: var(--docsearch-primary-color);
@@ -74,38 +74,26 @@ html[data-theme='dark'] {
7474
/* -------------------------------------------------- */
7575

7676
.docsearch-modal {
77-
@apply rounded-lg border !important;
77+
@apply font-sans;
7878
}
7979

80-
.docsearch-hit-container {
81-
@apply h-16 !important;
80+
.docsearch-modal-search-hits-category {
81+
@apply text-sm mb-1 !important;
8282
}
8383

84-
.docsearch-hit-content-wrapper {
85-
@apply mx-4 flex-col-reverse !important;
84+
.docsearch-modal-search-hits-item-title {
85+
@apply text-black font-semibold;
8686
}
8787

88-
.docsearch-modal-footer {
89-
@apply justify-end !important;
88+
.docsearch-modal-search-hits-item-text {
89+
@apply text-gray-darker font-normal text-sm !important;
9090
}
9191

92-
.docsearch-modal-footer-commands {
93-
@apply hidden !important;
94-
}
95-
96-
.docsearch-footer {
97-
@apply border-t !important;
98-
}
99-
100-
.docsearch-hit-path {
101-
@apply text-lg font-display font-medium text-black !important;
102-
}
103-
104-
.docsearch-hits mark {
105-
color: inherit !important;
106-
}
107-
#docsearch {
108-
@apply w-full !important;
92+
.docsearch-modal-search-hits-item--active {
93+
.docsearch-modal-search-hits-item-text,
94+
.docsearch-modal-search-hits-item-title {
95+
@apply text-white !important;
96+
}
10997
}
11098

11199
.docsearch-btn {
@@ -118,6 +106,7 @@ html[data-theme='dark'] {
118106
.docsearch-btn-keys {
119107
@apply hidden lg:flex ml-auto !important;
120108
}
109+
121110
.docsearch-btn-key {
122111
@apply bg-white border shadow-md text-black uppercase pb-0 min-w-[18px] h-[18px] relative !important;
123112
top: -1px !important;
@@ -127,6 +116,13 @@ html[data-theme='dark'] {
127116
@apply flex-1 !important;
128117
}
129118

119+
.docsearch-modal-search-hits-item-text {
120+
overflow: hidden;
121+
display: -webkit-box;
122+
-webkit-box-orient: vertical;
123+
-webkit-line-clamp: 1;
124+
}
125+
130126
.dark {
131127
.docsearch-btn {
132128
@apply bg-transparent !important;

resources/views/partials/nav.antlers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</ul>
1717
<div class="flex items-center h-full">
1818
<form class="relative hidden md:flex items-center text-sm w-[160px] lg:w-[240px] h-9 m-0 rounded border-2 border-black shadow-sm md:shadow relative top-[-2px] dark:bg-gray-darkest" :class="{ 'md:hidden': themePickerOpen }" action="/search-results">
19-
<div id="docsearch" ref="docSearch"></div>
19+
<div id="docsearch" class="w-full" ref="docSearch"></div>
2020
</form>
2121
{{ partial:theme }}
2222
</div>

0 commit comments

Comments
 (0)