Skip to content

Commit 99025e1

Browse files
committed
Fix excessive padding, width of search results on mobile, hide scroll to top on mobile
1 parent 1b78fdf commit 99025e1

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

app/assets/styles.css

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ main a.edit-icon {
3636

3737
.sidebar-container {
3838
--sidebar-width: min-content;
39+
padding: 0;
3940
}
4041

4142
.es-sidebar-content .table-of-contents:first-child {
@@ -194,25 +195,25 @@ section.event {
194195

195196
.search-results {
196197
position: absolute;
197-
right: 0;
198+
width: 100%;
199+
min-width: auto;
200+
max-height: initial;
198201
top: 100%;
199-
width: 25vw;
200-
min-width: 500px;
201202
background-color: white;
202203
color: black;
203204
border-radius: 8px;
204205
margin-top: 10px;
205206
border: 2px solid var(--color-card-border);
206207
overflow-x: auto;
207-
max-height: 70dvh;
208208
z-index: 1;
209209
}
210210

211-
@media (width <= 500px) {
211+
@media (width > 500px) {
212212
.search-results {
213-
width: 95dvw;
214-
min-width: auto;
215-
max-height: initial;
213+
width: 25vw;
214+
min-width: 500px;
215+
right: 0;
216+
max-height: 70dvh;
216217
}
217218
}
218219

@@ -322,6 +323,22 @@ table td {
322323

323324
/* End taken from guidemaker for search */
324325

326+
327+
.scroll-to-top {
328+
display: none; /* hidden on mobile */
329+
}
330+
331+
@media (width < 845px) {
332+
.es-sidebar[aria-expanded="true"] {
333+
padding: var(--spacing-2);
334+
margin: var(--spacing-2) 0 0 0;
335+
}
336+
337+
.es-sidebar-content {
338+
margin-top: 0;
339+
}
340+
}
341+
325342
@media (width >= 845px) {
326343
.es-header {
327344
padding: 0 var(--spacing-4);

0 commit comments

Comments
 (0)