Skip to content

Commit

Permalink
feat: add z-index to searchbox, narrower on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobvase committed Jan 12, 2025
1 parent 7ec1603 commit b1af71e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions static/search/search-box.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
--selected-color: #def;
}

#search-wrapper {
align-self: flex-end;
@media screen and (700px < width) {
:root {
--search-bar-width: 24rem;
}
}

@media screen and (width <= 700px) {
:root {
--search-bar-width: 12rem;
}
}

#search-wrapper .combobox-list {
Expand All @@ -29,7 +37,7 @@
}

#search-wrapper .combobox input {
width: 24rem;
width: var(--search-bar-width);
outline: none;
font-size: .9rem;
padding: .3rem .5rem;
Expand All @@ -46,7 +54,7 @@
padding: 0;
position: absolute;
top: calc(100%);
width: 24rem;
width: var(--search-bar-width);
list-style: none;
background-color: white;
display: none;
Expand Down Expand Up @@ -131,4 +139,5 @@
position: absolute;
top: 0;
right: 0;
z-index: 1;
}

0 comments on commit b1af71e

Please sign in to comment.