Skip to content

Commit d315ebf

Browse files
committed
fix(yir): prevent layout shifts in title section before profile loads
1 parent 64e5f0d commit d315ebf

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

projects/client/src/lib/sections/yir/_internal/YirTitleSection.svelte

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
</div>
5353
<div class="yir-titles-wrapper">
5454
<div class="yir-titles">
55-
{#if $profile}
56-
<div class="yir-user">
55+
<div class="yir-user">
56+
{#if $profile}
5757
<span class="yir-avatar-link">
5858
<UserAvatar user={$profile} size="large" />
5959
</span>
@@ -62,9 +62,9 @@
6262
{$profile.name.full || $profile.username}
6363
</Link>
6464
</span>
65-
</div>
66-
<div class="yir-under-user"></div>
67-
{/if}
65+
{/if}
66+
</div>
67+
<div class="yir-under-user"></div>
6868

6969
<h1 class="yir-year" class:is-text={isAllTime}>
7070
{isAllTime ? m.yir_label_all_time() : year}
@@ -181,6 +181,11 @@
181181
display: inline-flex;
182182
align-items: center;
183183
gap: var(--ni-10);
184+
min-height: var(--ni-40);
185+
186+
@include for-mobile {
187+
min-height: var(--ni-30);
188+
}
184189
}
185190
186191
.yir-avatar-link {

0 commit comments

Comments
 (0)