Skip to content

Commit fe92971

Browse files
KokonuticRongbin99
andauthored
Fix Side Margins for Mobile (#40)
This PR fixes the side margins to allow content to be properly displayed on mobile screens. This regression was caused by #38 Changes: - Implements mobile-first responsive padding for article.x\:container using media queries - Scales padding from 1rem on mobile to 10rem on large desktop screens - Uses standard responsive breakpoints (768px, 1024px, 1280px) Co-authored-by: Rongbin99 <rongbingu999@gmail.com>
1 parent 4e94f7f commit fe92971

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

styles/main.css

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,32 @@ article {
138138
/* content container */
139139
article.x\:container {
140140
max-width: 1200px !important;
141-
padding-left: 10rem !important;
142-
padding-right: 10rem !important;
141+
padding-left: 1rem !important;
142+
padding-right: 1rem !important;
143+
}
144+
145+
/* Tablet and larger */
146+
@media (min-width: 768px) {
147+
article.x\:container {
148+
padding-left: 4rem !important;
149+
padding-right: 4rem !important;
150+
}
151+
}
152+
153+
/* Desktop */
154+
@media (min-width: 1024px) {
155+
article.x\:container {
156+
padding-left: 8rem !important;
157+
padding-right: 8rem !important;
158+
}
159+
}
160+
161+
/* Large desktop */
162+
@media (min-width: 1280px) {
163+
article.x\:container {
164+
padding-left: 10rem !important;
165+
padding-right: 10rem !important;
166+
}
143167
}
144168

145169
.site-footer-text {

0 commit comments

Comments
 (0)