Skip to content

Commit 6077575

Browse files
authored
Merge pull request #288 from AlchemyCMS/backport/8.3-stable/pr-287
[8.3-stable] Merge pull request #287 from AlchemyCMS/fix-login-small-screens
2 parents ce1aa1a + 8fbe1ed commit 6077575

2 files changed

Lines changed: 53 additions & 14 deletions

File tree

app/assets/builds/alchemy-devise.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/stylesheets/alchemy-devise/login.scss

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,35 @@ body.passwords {
88
#errors {
99
margin-left: 157px;
1010
}
11+
12+
#main_content {
13+
padding-top: var(--spacing-2);
14+
display: flex;
15+
flex-direction: column;
16+
justify-content: center;
17+
}
1118
}
1219

1320
.logo-box {
14-
width: 250px;
15-
margin: 0 10px 1.5em 200px;
21+
display: flex;
22+
justify-content: end;
23+
align-items: end;
24+
margin-bottom: 1.5em;
1625

1726
svg {
1827
width: 200px;
1928
height: auto;
2029
}
30+
31+
small {
32+
width: 50px;
33+
}
2134
}
2235

2336
.login_signup_box {
24-
position: absolute;
25-
top: 50%;
26-
left: 50%;
27-
transform: translate(-50%, -50%);
37+
position: relative;
38+
max-width: 460px;
39+
margin: auto;
2840
--form-right-column-width: 1.65fr;
2941

3042
alchemy-message {
@@ -40,21 +52,24 @@ body.passwords {
4052
margin-left: 157px;
4153
}
4254

43-
.submit {
44-
> label {
45-
text-align: start;
55+
@media (max-width: 500px) {
56+
.input,
57+
.submit {
58+
grid-template-columns: 1fr;
4659

47-
input[type="checkbox"] {
48-
margin: 0 var(--spacing-0) 0 0;
60+
label {
61+
text-align: start;
62+
margin-bottom: var(--spacing-1);
4963
}
5064
}
65+
}
5166

67+
.submit {
5268
> a {
5369
display: inline-flex;
5470
align-items: center;
5571
gap: var(--spacing-0);
56-
grid-column: 2;
57-
grid-row: 1;
72+
width: fit-content;
5873

5974
&:hover {
6075
alchemy-icon {
@@ -64,4 +79,28 @@ body.passwords {
6479
}
6580
}
6681
}
82+
83+
@media (min-width: 501px) {
84+
right: 5%;
85+
86+
.submit {
87+
grid-template-columns: var(--form-left-column-width) minmax(
88+
282px,
89+
var(--form-right-column-width)
90+
);
91+
92+
> label {
93+
text-align: start;
94+
95+
input[type="checkbox"] {
96+
margin: 0 var(--spacing-0) 0 0;
97+
}
98+
}
99+
100+
> a {
101+
grid-column: 2;
102+
grid-row: 1;
103+
}
104+
}
105+
}
67106
}

0 commit comments

Comments
 (0)