Skip to content

Commit 3aafbf1

Browse files
fix: Avoid page jumps when search loads (#829)
Assign a fixed height to the search so that the space is already reserved before the search loads. Co-authored-by: Robert Schuster <77234379+therobrob@users.noreply.github.com>
1 parent 5129ab5 commit 3aafbf1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

assets/sass/search.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $search-z-index-focus: 12;
33

44
#search {
55
width: 100%;
6+
height: 64px;
67
display: flex;
78
z-index: $search-z-index;
89

@@ -12,9 +13,11 @@ $search-z-index-focus: 12;
1213

1314
.pagefind-ui {
1415
width: 100%;
16+
height: 100%;
1517

1618
&__form {
1719
position: relative;
20+
height: 100%;
1821

1922
&::before {
2023
content: "search";
@@ -55,7 +58,7 @@ $search-z-index-focus: 12;
5558
border: var(--border);
5659
box-shadow: var(--box-shadow);
5760
border-radius: var(--border-radius-l);
58-
height: 64px;
61+
height: 100%;
5962
background-color: var(--bg-default);
6063
color: var(--color-body);
6164
padding: 0 70px 0 54px;

0 commit comments

Comments
 (0)