Skip to content

Commit 29ef21e

Browse files
vatsalparikhlivstowe
authored andcommitted
fix(social-login): remove extra container around social login container
1 parent ba0428a commit 29ef21e

1 file changed

Lines changed: 24 additions & 21 deletions

File tree

experimental/custom/stages/social-login-reversed/social-login-reversed.svelte

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ Set the Stage field on your AM Page Node to "SocialLoginReversed".
158158
159159
onMount(() => {
160160
if (componentStyle === 'modal') captureLinks(linkWrapper, journey);
161+
const bg = 'linear-gradient(145deg, #0f0c29, #302b63, #24243e)';
162+
document.documentElement.style.background = bg;
163+
document.body.style.background = bg;
164+
const rootEl = document.querySelector<HTMLElement>('.root');
165+
if (rootEl) rootEl.style.background = bg;
166+
document.documentElement.classList.add('social-login-reversed-active');
161167
document.body.classList.add('social-login-reversed-active');
162168
163169
if (canvas) {
@@ -190,6 +196,11 @@ Set the Stage field on your AM Page Node to "SocialLoginReversed".
190196
});
191197
192198
onDestroy(() => {
199+
document.documentElement.style.background = '';
200+
document.body.style.background = '';
201+
const rootEl = document.querySelector<HTMLElement>('.root');
202+
if (rootEl) rootEl.style.background = '';
203+
document.documentElement.classList.remove('social-login-reversed-active');
193204
document.body.classList.remove('social-login-reversed-active');
194205
cancelAnimationFrame(animFrame);
195206
clearTimeout(breachDebounce);
@@ -325,12 +336,9 @@ Set the Stage field on your AM Page Node to "SocialLoginReversed".
325336
/* ── Shell & canvas ─────────────────────────────────────── */
326337
.stage-shell {
327338
position: relative;
328-
min-height: 100vh;
329339
display: flex;
330340
align-items: center;
331341
justify-content: center;
332-
background: linear-gradient(135deg, #0d0d1a 0%, #1a0533 50%, #0d1a33 100%);
333-
overflow: hidden;
334342
}
335343
336344
.particle-canvas {
@@ -347,11 +355,9 @@ Set the Stage field on your AM Page Node to "SocialLoginReversed".
347355
z-index: 1;
348356
width: 100%;
349357
max-width: 420px;
350-
margin: 2rem 1rem;
351-
background: rgba(255, 255, 255, 0.04);
352-
backdrop-filter: blur(20px);
353-
-webkit-backdrop-filter: blur(20px);
354-
border: 1px solid rgba(255, 255, 255, 0.1);
358+
margin: 0;
359+
background: rgba(255, 255, 255, 0.08);
360+
border: 1px solid rgba(255, 255, 255, 0.12);
355361
border-radius: 1.5rem;
356362
padding: 2.25rem 2rem;
357363
box-shadow:
@@ -416,15 +422,11 @@ Set the Stage field on your AM Page Node to "SocialLoginReversed".
416422
color: #fff;
417423
margin: 0;
418424
letter-spacing: -0.02em;
419-
background: linear-gradient(90deg, #e2d9f3, #ffffff);
420-
-webkit-background-clip: text;
421-
-webkit-text-fill-color: transparent;
422-
background-clip: text;
423425
}
424426
425427
.card-sub {
426428
font-size: 0.875rem;
427-
color: rgba(255, 255, 255, 0.45);
429+
color: rgba(255, 255, 255, 0.55);
428430
margin: 0;
429431
}
430432
@@ -623,20 +625,21 @@ Set the Stage field on your AM Page Node to "SocialLoginReversed".
623625
transform: translateY(0);
624626
}
625627
626-
/* Neutralize the Box wrapper while this stage is mounted */
627-
:global(body.social-login-reversed-active),
628-
:global(body.social-login-reversed-active > div) {
629-
background: transparent !important;
630-
min-height: unset !important;
628+
/* Hide the separator hr rendered by SelectIdPCallback */
629+
:global(body.social-login-reversed-active .card hr.tw_border-0) {
630+
display: none !important;
631631
}
632632
633+
/* Neutralize the Box wrapper while this stage is mounted */
634+
:global(body.social-login-reversed-active > div),
635+
:global(body.social-login-reversed-active .tw_bg-body-light),
636+
:global(body.social-login-reversed-active .tw_bg-body-dark),
633637
:global(body.social-login-reversed-active .tw_containing-box),
634638
:global(body.social-login-reversed-active .tw_containing-box_dark),
635-
:global(body.social-login-reversed-active .tw_containing-box_medium) {
639+
:global(body.social-login-reversed-active [class*='tw_containing-box']) {
636640
background: transparent !important;
637641
box-shadow: none !important;
638642
border: none !important;
639-
padding: 0 !important;
640-
max-width: unset !important;
643+
min-height: unset !important;
641644
}
642645
</style>

0 commit comments

Comments
 (0)