Skip to content

Commit 7bba52d

Browse files
authored
fix: prevent layout shift on sent page when collapsible opens (#33)
* fix: prevent illustration from shifting when collapsible opens on sent page (#26) Add min-width: 0 and overflow: hidden to the .done flex container in +page.svelte so it cannot grow beyond its parent when the <details> element expands. Apply the same constraints to the Done.svelte .container (also adding width: 100% and box-sizing: border-box) and to HelpToggle's .help-section, so text revealed by the collapsible cannot push the column wider and shift the airplane illustration. * fix: remove hardcoded container names to allow multiple worktrees to run simultaneously
1 parent a0ed4ee commit 7bba52d

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/lib/components/HelpToggle.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
.help-section {
3030
width: 100%;
3131
box-sizing: border-box;
32+
min-width: 0;
33+
overflow: hidden;
3234
}
3335
3436
.help-section.bordered {

src/lib/components/filesharing/Done.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@
6868
align-items: center;
6969
gap: 1.5rem;
7070
padding: 2rem 2rem 0 2rem;
71+
width: 100%;
7172
max-width: 600px;
7273
margin: 0 auto;
74+
box-sizing: border-box;
7375
flex: 1; /* fill the .done wrapper in +page.svelte */
76+
min-width: 0;
7477
}
7578
7679
h2 {

src/routes/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
display: flex;
131131
flex-direction: column;
132132
flex: 1;
133+
min-width: 0;
134+
overflow: hidden;
133135
}
134136
135137
@media only screen and (min-width: 768px) {

0 commit comments

Comments
 (0)