Make the search bar sticky

This commit is contained in:
Jordan Eldredge 2018-11-26 21:16:02 -08:00
parent ba88e28e8b
commit a46a540934
2 changed files with 13 additions and 0 deletions

View file

@ -4,9 +4,17 @@ body {
#search {
width: 100%;
position: fixed;
top: 0;
background: black;
padding: 5px;
text-align: center;
height: 50px; /* This matches the margin-top for #infinite-skins */
z-index: 5;
/* A little shadow below the search bar */
-webkit-box-shadow: 0px 10px 15px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 10px 15px 0px rgba(0, 0, 0, 0.35);
box-shadow: 0px 10px 15px 0px rgba(0, 0, 0, 0.35);
}
#search input {
@ -15,6 +23,10 @@ body {
font-size: 40px;
}
#infinite-skins {
margin-top: 50px; /* This matches the height of #search */
}
body.overlay-open {
overflow: hidden;
}

View file

@ -136,6 +136,7 @@ class App extends React.Component {
/>
</div>
<div
id="infinite-skins"
style={{
height: Math.ceil(hashes.length / columnCount) * SKIN_HEIGHT,
position: "relative"