Skip to content

Commit 53901b5

Browse files
committed
Better mobile whitespace scaling
1 parent 976536d commit 53901b5

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

src/index.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,18 @@ mobile has scaling widths and font sizes
244244

245245
@media (max-width: 720px){
246246
.navigation{
247-
margin-bottom: calc(3vh);
247+
/* no scaling for very short devices,
248+
scaling matching the mlh badge scaling for avg devices,
249+
high scaling for very tall devices
250+
*/
251+
margin-bottom: max(0px, 10vh - 40px, 0px, 30vh - 190px);
248252
}
249253
#mlh-badge{
250-
width: calc(30px + 2.5vh + 2.5vw);
254+
/*68 px is the current height of the nav bar
255+
will think of a better way to structure this later*/
256+
height: max(68px, 35px + 10vh);
257+
width: auto;
258+
251259
margin-left: 15px;
252260
}
253261

@@ -269,11 +277,13 @@ mobile has scaling widths and font sizes
269277
}
270278

271279
.hero-img{
272-
width: 90%;
280+
/* slightly smaller hero img for shorter screens */
281+
min-width: 80%;
282+
width: min(50vh, 90%);
273283
}
274284

275285
.mailchimp-container{
276-
width: 75vw;
286+
width: 80vw;
277287

278288
margin-top: calc(1vh);
279289

@@ -297,5 +307,6 @@ mobile has scaling widths and font sizes
297307
}
298308
.mobile-banner{
299309
font-size: 3.5vw;
310+
margin-bottom: 2.5vh;
300311
}
301312
}

0 commit comments

Comments
 (0)