Skip to content

Commit

Permalink
fix: fixed hits display height, no more scroll jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Aug 4, 2015
1 parent 3b64651 commit 6b4319d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions example/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
html {
/* force vertical scrollbar no matter the content,
avoid container center position changes */
overflow-y: scroll;
}

body {
padding: 2em 0;
}

/* Hits widget */
.hit + .hit {
margin-top: 1em;
padding-top: 1em;
Expand All @@ -12,3 +19,19 @@ body {
font-style: normal;
background-color: lightcyan;
}

/* Force widths and heights to avoid vertical size changes.
So that pagination clicks will not jump */
.hit img {
max-height: 100px;
max-width: 100px;
}

.hit p {
max-height: 50px;
text-overflow: ellipsis;
}

.hit {
height: 125px;
}

0 comments on commit 6b4319d

Please sign in to comment.