Skip to content

Commit 056aaee

Browse files
MG-10: Improve vertical centering and spacing
1 parent c733264 commit 056aaee

File tree

1 file changed

+16
-1
lines changed
  • src/main/resources/theme/esil/login/resources/css

1 file changed

+16
-1
lines changed

src/main/resources/theme/esil/login/resources/css/styles.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
html {
1212
font-size: 16px;
13+
height: 100%;
1314
}
1415

1516
body {
@@ -103,11 +104,12 @@ button:hover {
103104
}
104105

105106
.login-container {
106-
height: 100vh;
107107
display: flex;
108108
flex-direction: column;
109109
justify-content: center;
110110
align-items: center;
111+
min-height: 100vh; /* make container span viewport so justify-content centers vertically */
112+
padding: 2rem 0; /* add vertical spacing so forms don't start at the very top edge */
111113
}
112114

113115
.card {
@@ -122,12 +124,14 @@ button:hover {
122124
width: 23rem;
123125
padding: 2.5rem;
124126
border-radius: 1rem;
127+
margin-bottom: 2rem;
125128
}
126129

127130
.configure-otp-card {
128131
width: 36rem;
129132
padding: 2.5rem;
130133
border-radius: 1rem;
134+
margin-bottom: 2rem;
131135
}
132136

133137
.login-center {
@@ -513,6 +517,17 @@ a#kc-current-locale-link {
513517
}
514518
}
515519

520+
@media (max-width: 480px) {
521+
.login-container {
522+
padding: 1rem 0; /* reduce padding on smaller screens */
523+
}
524+
525+
.login-card,
526+
.configure-otp-card {
527+
margin-bottom: 1rem; /* smaller bottom spacing on narrow viewports */
528+
}
529+
}
530+
516531
#dropdown-content {
517532
display: none;
518533
position: absolute;

0 commit comments

Comments
 (0)