Skip to content

Commit 0a5f21f

Browse files
authored
Mobile breakpoints on interstitial modal (#14193)
### WHY are these changes introduced? Interstitial modal is misaligned on very small screen sizes. ### WHAT is this pull request doing? Adds mobile breakpoint and center-aligns for mobile.
1 parent 372d236 commit 0a5f21f

File tree

1 file changed

+57
-4
lines changed

1 file changed

+57
-4
lines changed

polaris.shopify.com/src/components/InterstitialModal/InterstitialModal.module.scss

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
z-index: 10000;
1212
padding: 2rem;
1313
animation: fadeIn 0.4s ease-in-out;
14+
overflow-y: auto;
15+
16+
@media (max-width: 768px) {
17+
padding: 1rem;
18+
}
19+
20+
@media (max-width: 480px) {
21+
padding: 0.75rem;
22+
}
1423

1524
@media (prefers-reduced-motion: reduce) {
1625
animation: none;
@@ -146,6 +155,10 @@
146155
@media (max-width: 768px) {
147156
padding: 1.5rem;
148157
}
158+
159+
@media (max-width: 480px) {
160+
padding: 1rem;
161+
}
149162
}
150163

151164
.StarIconContainer {
@@ -159,9 +172,17 @@
159172
@media (max-width: 768px) {
160173
width: 180px;
161174
height: 240px;
162-
margin: -1rem auto 5rem;
163-
padding-bottom: 3rem;
164-
padding-top: 2rem;
175+
margin: -1rem auto 4rem;
176+
padding-bottom: 2rem;
177+
padding-top: 1.5rem;
178+
}
179+
180+
@media (max-width: 480px) {
181+
width: 140px;
182+
height: 200px;
183+
margin: 0 auto 2.5rem;
184+
padding-bottom: 1.5rem;
185+
padding-top: 1rem;
165186
}
166187
}
167188

@@ -246,6 +267,11 @@
246267
width: 180px;
247268
height: 180px;
248269
}
270+
271+
@media (max-width: 480px) {
272+
width: 120px;
273+
height: 120px;
274+
}
249275
}
250276

251277
// Background star bottom layer sinks down and blurs more (sunsetting)
@@ -307,7 +333,13 @@
307333
line-height: 1.3;
308334

309335
@media (max-width: 768px) {
310-
font-size: var(--font-size-1000);
336+
font-size: var(--font-size-900);
337+
margin: 0 0 1rem 0;
338+
}
339+
340+
@media (max-width: 480px) {
341+
font-size: var(--font-size-800);
342+
margin: 0 0 0.75rem 0;
311343
}
312344
}
313345

@@ -320,6 +352,13 @@
320352

321353
@media (max-width: 768px) {
322354
font-size: var(--font-size-600);
355+
margin: 0 0 2rem 0;
356+
}
357+
358+
@media (max-width: 480px) {
359+
font-size: var(--font-size-500);
360+
margin: 0 0 1.5rem 0;
361+
line-height: 1.5;
323362
}
324363
}
325364

@@ -328,6 +367,10 @@
328367
flex-direction: column;
329368
gap: 1.25rem;
330369
align-items: center;
370+
371+
@media (max-width: 480px) {
372+
gap: 1rem;
373+
}
331374
}
332375

333376
.PrimaryButton {
@@ -344,6 +387,11 @@
344387
border: none !important;
345388
transition: all var(--duration-200) var(--ease-in-out) !important;
346389

390+
@media (max-width: 480px) {
391+
padding: 0.875rem 1.5rem !important;
392+
font-size: var(--font-size-500) !important;
393+
}
394+
347395
&:hover {
348396
background: var(--p-color-bg-fill-hover) !important;
349397
transform: translateY(-1px);
@@ -383,6 +431,11 @@
383431
opacity: 0.9;
384432
transition: opacity var(--duration-200) var(--ease-in-out);
385433

434+
@media (max-width: 480px) {
435+
font-size: var(--font-size-300);
436+
padding: 0.375rem;
437+
}
438+
386439
&:hover {
387440
opacity: 1;
388441
}

0 commit comments

Comments
 (0)