Skip to content

Commit 5cc8cbc

Browse files
committed
Fix content becoming scrollable on front page
1 parent 64b0388 commit 5cc8cbc

File tree

4 files changed

+48
-14
lines changed

4 files changed

+48
-14
lines changed

sources/stylesheets/_variables.scss

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ $max-page-width: 1440px;
3737

3838
$mobile-width: 640px;
3939
$tablet-width: 900px;
40+
$desktop-width: 1440px;

sources/stylesheets/layouts/_front-page.scss

+27-7
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
display: flex;
4848
align-items: center;
4949
justify-content: flex-start;
50+
max-width: $max-page-width;
5051

5152
.content-formatted {
5253
width: 100%;
@@ -60,6 +61,10 @@
6061
}
6162
}
6263

64+
.split-section {
65+
max-width: $max-page-width;
66+
}
67+
6368
.split_dominant_right {
6469
display: flex;
6570
flex-direction: column;
@@ -93,14 +98,11 @@
9398
}
9499
}
95100

96-
@media screen and (max-width: $tablet-width) {
101+
@media (max-width: $desktop-width) {
97102
.front-page {
98103
.front-page-wrapper {
99-
padding: 24px;
100-
}
101-
102-
.hero {
103-
min-height: auto;
104+
padding: 0;
105+
max-width: calc(100vw - 48px);
104106
}
105107

106108
.split_dominant_right,
@@ -110,10 +112,28 @@
110112
}
111113

112114
.split-section {
113-
grid-template-columns: 1fr;
115+
grid-template-columns: calc(100vw - 48px);
116+
}
117+
}
118+
119+
.column {
120+
.split-section {
121+
max-width: calc(100vw - 48px);
114122
}
115123
}
116124

125+
.hero {
126+
max-width: calc(100vw - 48px);
127+
}
128+
}
129+
}
130+
131+
@media screen and (max-width: $tablet-width) {
132+
.front-page {
133+
.hero {
134+
min-height: auto;
135+
}
136+
117137
.column .split-section {
118138
display: flex;
119139
flex-direction: column;

stylesheets/main.css

+19-6
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ body.edy-checkout-button-visible {
826826
display: flex;
827827
align-items: center;
828828
justify-content: flex-start;
829+
max-width: 1440px;
829830
}
830831
.front-page .hero .content-formatted {
831832
width: 100%;
@@ -834,6 +835,9 @@ body.edy-checkout-button-visible {
834835
.front-page .split_even .hero {
835836
width: 50%;
836837
}
838+
.front-page .split-section {
839+
max-width: 1440px;
840+
}
837841
.front-page .split_dominant_right {
838842
display: flex;
839843
flex-direction: column;
@@ -860,20 +864,29 @@ body.edy-checkout-button-visible {
860864
color: var(--darkmode-color);
861865
}
862866

863-
@media screen and (max-width: 900px) {
867+
@media (max-width: 1440px) {
864868
.front-page .front-page-wrapper {
865-
padding: 24px;
866-
}
867-
.front-page .hero {
868-
min-height: auto;
869+
padding: 0;
870+
max-width: calc(100vw - 48px);
869871
}
870872
.front-page .split_dominant_right .hero,
871873
.front-page .split_even .hero {
872874
width: 100%;
873875
}
874876
.front-page .split_dominant_right .split-section,
875877
.front-page .split_even .split-section {
876-
grid-template-columns: 1fr;
878+
grid-template-columns: calc(100vw - 48px);
879+
}
880+
.front-page .column .split-section {
881+
max-width: calc(100vw - 48px);
882+
}
883+
.front-page .hero {
884+
max-width: calc(100vw - 48px);
885+
}
886+
}
887+
@media screen and (max-width: 900px) {
888+
.front-page .hero {
889+
min-height: auto;
877890
}
878891
.front-page .column .split-section {
879892
display: flex;

stylesheets/main.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)