Skip to content

Commit d78a139

Browse files
committed
Improve profile snippet on smaller sizes
1 parent e24b9b6 commit d78a139

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/css/ui/components/avatar.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
height: var(--avatar_size);
1010
border-radius: calc(var(--avatar_size) / 2);
1111
display: inline-flex;
12+
flex-shrink: 0;
1213
align-items: center;
1314
justify-content: center;
1415
background-color: transparent; /* Don't use a color when we don't yet know if there's an image loading */

src/css/ui/components/profile-snippet.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
align-items: center;
2828
gap: 0.5rem;
2929
transition: background 0.2s;
30+
31+
container-type: inline-size;
32+
container-name: profile-snippet;
3033
}
3134

3235
.profile-snippet .profile-snippet_text {
@@ -78,3 +81,15 @@
7881
overflow: hidden;
7982
white-space: nowrap;
8083
}
84+
85+
@container profile-snippet (max-width: 300px) {
86+
.profile-snippet_text {
87+
flex-direction: column;
88+
align-items: flex-start;
89+
gap: 0rem;
90+
91+
& .profile-snippet_handle {
92+
--c-size_profile-snippet_handle: var(--font-size-extra-small);
93+
}
94+
}
95+
}

0 commit comments

Comments
 (0)