Skip to content

Commit b2173ba

Browse files
committed
Modified social buttons to align one under another
1 parent d45ad3c commit b2173ba

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

modules/sociallogin/views/css/sociallogin.css

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
.sl-auth__divider::before { left: 0; }
2121
.sl-auth__divider::after { right: 0; }
2222

23-
/* Responsive grid for buttons */
23+
/* Stack buttons vertically (one under another) */
2424
.sl-auth__buttons {
25-
display: grid;
26-
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
25+
display: flex;
26+
flex-direction: column;
2727
gap: .6rem;
2828
}
2929

@@ -39,30 +39,29 @@
3939
border-radius: 999px;
4040
font-weight: 600;
4141
text-decoration: none;
42-
border: 1px solid transparent;
42+
border: 1.7px solid transparent;
4343
transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
4444
will-change: transform, box-shadow;
4545
outline: none;
4646
}
4747

48-
/* Icon + text layout */
48+
/* Icon + text layout (centered, no stretching) */
4949
.sl-btn__icon {
50-
display: flex;
51-
align-items: center;
50+
display: inline-flex;
51+
align-items: center;
5252
justify-content: center;
5353
line-height: 0;
54-
display: inline-grid;
55-
place-items: center;
5654
width: var(--sl-icon-size);
5755
height: var(--sl-icon-size);
5856
flex: 0 0 var(--sl-icon-size);
5957
}
6058
.sl-btn__icon img {
6159
display: block;
62-
width: 100%;
63-
height: 100%;
64-
object-fit: contain; /* keep aspect ratio */
65-
object-position: center;/* center inside square box */
60+
height: 100%; /* fill icon box height */
61+
width: auto; /* preserve aspect ratio */
62+
max-width: 100%; /* guard super-wide svgs */
63+
object-fit: contain; /* no distortion */
64+
object-position: center;
6665
vertical-align: middle;
6766
}
6867
.sl-btn__text { line-height: 1; }
@@ -79,8 +78,8 @@
7978
color: #1f2937;
8079
background: #fff;
8180
border-color: var(--gray-300, #e5e7eb);
82-
box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
8381
}
82+
8483
.sl-btn--google:hover {
8584
background: #fff;
8685
border-color: var(--gray-400, #d1d5db);
@@ -93,7 +92,6 @@
9392
--sl-icon-size: 18px;
9493
color: #fff;
9594
background: #0766FF;
96-
box-shadow: 0 2px 10px rgba(24, 119, 242, .20);
9795
}
9896
.sl-btn--facebook:hover {
9997
background: #0766FF;
@@ -106,7 +104,6 @@
106104
--sl-icon-size: 18px;
107105
color: #fff;
108106
background: #000;
109-
box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
110107
}
111108
.sl-btn--apple:hover {
112109
background: #111;

0 commit comments

Comments
 (0)