Skip to content

Commit 5cc2009

Browse files
committed
fix aspect ratio of user avatar on lock screen in web-greeter
nody-greeter supports the aspect-ratio CSS property, web-greeter does not
1 parent 20e1a07 commit 5cc2009

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

static/css/styles.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,18 @@ form#lock-form {
303303
display: block;
304304
margin: 0 auto calc(var(--padding) * 6) auto;
305305
width: 100%;
306-
aspect-ratio: 1 / 1;
307-
object-fit: cover;
306+
height: 264px; /* same as usual form width */
308307
border-radius: 50%;
309308
background-color: var(--bg-color-darken-strong);
310309
}
311310

311+
@supports (aspect-ratio: 1 / 1) { /* not supported by web-greeter, only nody-greeter */
312+
#active-user-session-avatar {
313+
width: auto; /* let aspect-ratio do the work */
314+
aspect-ratio: 1 / 1;
315+
}
316+
}
317+
312318
/* user display name, "reserved for exam" text */
313319
form h3 {
314320
font-weight: bold;

0 commit comments

Comments
 (0)