Skip to content

Commit 6b4319d

Browse files
author
vvo
committed
fix: fixed hits display height, no more scroll jumps
1 parent 3b64651 commit 6b4319d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: example/style.css

+23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
html {
2+
/* force vertical scrollbar no matter the content,
3+
avoid container center position changes */
4+
overflow-y: scroll;
5+
}
6+
17
body {
28
padding: 2em 0;
39
}
410

11+
/* Hits widget */
512
.hit + .hit {
613
margin-top: 1em;
714
padding-top: 1em;
@@ -12,3 +19,19 @@ body {
1219
font-style: normal;
1320
background-color: lightcyan;
1421
}
22+
23+
/* Force widths and heights to avoid vertical size changes.
24+
So that pagination clicks will not jump */
25+
.hit img {
26+
max-height: 100px;
27+
max-width: 100px;
28+
}
29+
30+
.hit p {
31+
max-height: 50px;
32+
text-overflow: ellipsis;
33+
}
34+
35+
.hit {
36+
height: 125px;
37+
}

0 commit comments

Comments
 (0)