Skip to content

Commit

Permalink
Prevent search results horizontal scrolling and overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Jun 10, 2022
1 parent 186c975 commit 668e6fd
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,31 @@ div.awesomplete li[aria-selected="true"] mark {

.search-wrap div.awesomplete > ul {
top: 40px;
max-width: 100%;
text-align: left;
max-height: 13.5em;
color: #404040;
overflow: auto;
overflow-x: hidden;
background: linear-gradient(to bottom right, #fff, hsla(0, 0%, 100%, 0.9));
}

@media (min-width: 400px) {
.search-wrap div.awesomplete > ul {
max-width: calc( 100vw - 50% - var(--wp--custom--alignment--scroll-bar-width) );
}
}

.search-wrap div.awesomplete > ul li {
padding-right: 20px;
}

.search-wrap-inline div.awesomplete > ul {
right: 0;
left: auto;
}

.search-wrap .searchform label div.awesomplete > input,
.search-wrap div.awesomplete {
.search-wrap div.awesomplete {
width: 100%;
}

Expand All @@ -51,7 +62,7 @@ div.awesomplete li[aria-selected="true"] mark {

.search-wrap div.awesomplete {
/* This is for the input to expand */
display: flex;
display: flex;
}

div.awesomplete > ul::before {
Expand Down

0 comments on commit 668e6fd

Please sign in to comment.