Skip to content

Commit 02dc30a

Browse files
fix: searchbar expansion
Signed-off-by: Aditya Tiwari <[email protected]>
1 parent 1bd2fae commit 02dc30a

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/stylesheets/extra.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,4 +693,52 @@ article.md-search-result__article p:not(.md-search-result__meta) {
693693
-webkit-line-clamp: 3;
694694
-webkit-box-orient: vertical;
695695
overflow: hidden;
696+
}
697+
698+
/* Search overlay fix - makes search bar overlay navigation instead of pushing it */
699+
.md-search {
700+
position: relative;
701+
}
702+
703+
.md-search__form {
704+
border-radius: 10px;
705+
position: relative;
706+
}
707+
708+
.md-search__output {
709+
position: absolute;
710+
top: 100%;
711+
left: 0;
712+
right: 0;
713+
z-index: 100;
714+
}
715+
716+
/* When search is active, make the overlay appear over navigation */
717+
.md-search[data-md-state="active"] .md-search__form {
718+
position: absolute;
719+
left: 0;
720+
right: 0;
721+
z-index: 99;
722+
background-color: white;
723+
border: black 1px solid;
724+
border-radius: 10px;
725+
}
726+
727+
/* Make sure the search input maintains its styling when active */
728+
.md-search[data-md-state="active"] .md-search__input {
729+
background-color: white;
730+
border: black 1px solid;
731+
border-radius: 10px;
732+
}
733+
734+
/* Ensure the search overlay sits above navigation items */
735+
@media screen and (min-width: 60em) {
736+
.md-search__form {
737+
position: relative;
738+
}
739+
740+
.md-search[data-md-state="active"] {
741+
position: relative;
742+
z-index: 100;
743+
}
696744
}

0 commit comments

Comments
 (0)