Skip to content

Commit

Permalink
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 21d8097
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions static/search/search-box.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
:root {
--selected-color: #def;
--search-bar-width: 12rem;
}

@media screen and (max-width: 768px) {
:root {
--search-bar-width: 24rem;
}
}

#search-wrapper {
align-self: flex-end;
z-index: 1;
}

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

#search-wrapper .combobox input {
width: 24rem;
width: var(--search-bar-width);
outline: none;
font-size: .9rem;
padding: .3rem .5rem;
Expand All @@ -46,7 +53,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

0 comments on commit 21d8097

Please sign in to comment.