Skip to content

Commit 42bbfce

Browse files
committed
fix registration and login pop up on mobile
1 parent e31bcc1 commit 42bbfce

1 file changed

Lines changed: 45 additions & 3 deletions

File tree

src/v2/components/auth/loginButton/LoginButton.ts

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ export class LoginButton extends LitElement {
9797
background: transparent;
9898
outline: none;
9999
overflow: visible;
100-
max-height: none;
101-
max-width: none;
100+
width: min(30rem, calc(100vw - 2rem));
101+
max-width: calc(100vw - 2rem);
102+
max-height: calc(100dvh - 2rem);
102103
}
103104
104105
.popup-dialog::backdrop {
@@ -111,7 +112,11 @@ export class LoginButton extends LitElement {
111112
box-shadow: var(--popup-shadow);
112113
border: 1px solid var(--popup-border);
113114
border-radius: var(--border-radius-md, 0.5rem);
114-
min-width: 480px;
115+
width: min(30rem, calc(100vw - 2rem));
116+
min-width: min(30rem, calc(100vw - 2rem));
117+
max-width: calc(100vw - 2rem);
118+
max-height: calc(100dvh - 2rem);
119+
overflow: auto;
115120
z-index: 1001;
116121
}
117122
@@ -304,6 +309,43 @@ export class LoginButton extends LitElement {
304309
font-size: 0.875rem;
305310
margin-top: 8px;
306311
}
312+
313+
@media (max-width: 40rem) {
314+
.popup-dialog {
315+
width: calc(100vw - 1rem);
316+
max-width: calc(100vw - 1rem);
317+
max-height: calc(100dvh - 1rem);
318+
}
319+
320+
.popup-box {
321+
width: calc(100vw - 1rem);
322+
min-width: 0;
323+
max-width: calc(100vw - 1rem);
324+
max-height: calc(100dvh - 1rem);
325+
border-radius: var(--border-radius-base, 0.3125rem);
326+
}
327+
328+
.popup-top-menu,
329+
.issuer-text-section,
330+
.popup-footer {
331+
padding-left: 0.75rem;
332+
padding-right: 0.75rem;
333+
}
334+
335+
.popup-footer {
336+
flex-wrap: wrap;
337+
gap: 0.625rem;
338+
}
339+
340+
.popup-footer > button {
341+
flex: 1 1 100%;
342+
}
343+
344+
.issuer-text-row,
345+
.issuer-input-field-row {
346+
width: 100%;
347+
}
348+
}
307349
`
308350

309351
declare label: string

0 commit comments

Comments
 (0)