Skip to content

Commit

Permalink
Fix positioning of search results at mobile breakpoint on homepage (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
m-allanson authored and KyleAMathews committed Feb 5, 2018
1 parent 96424c1 commit 563b168
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions www/src/components/search-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ css.insert(`
box-shadow: 0 3px 10px 0.05rem ${hex2rgba(colors.lilac, 0.25)} !important;
}
.is-homepage .algolia-autocomplete .ds-dropdown-menu {
top: ${rhythm(2.5)} !important;
}
/* .searchWrap to beat docsearch.css' !important */
.searchWrap .algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu,
.searchWrap .algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu {
Expand Down Expand Up @@ -193,6 +197,7 @@ css.insert(`
}
@media ${presets.tablet} {
.is-homepage .algolia-autocomplete .ds-dropdown-menu,
.algolia-autocomplete .ds-dropdown-menu {
top: 100% !important;
position: absolute !important;
Expand Down
2 changes: 1 addition & 1 deletion www/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DefaultLayout extends React.Component {
}

return (
<div>
<div className={isHomepage && `is-homepage`}>
<Helmet defaultTitle={`GatsbyJS`} titleTemplate={`%s | GatsbyJS`}>
<meta name="twitter:site" content="@gatsbyjs" />
<meta name="og:type" content="website" />
Expand Down

0 comments on commit 563b168

Please sign in to comment.