Skip to content

Commit 503abda

Browse files
committed
ios gutter
1 parent 8913721 commit 503abda

2 files changed

Lines changed: 35 additions & 7 deletions

File tree

src/App.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,12 @@ const App: React.FC = () => {
419419

420420
<div
421421
className={classNames(
422-
"site-content flex flex-col h-screen tour-step-16 tour-step-17 tour-step-18 normal-bg",
423-
{ 'star-sky': theme.includes('ab') }
422+
"site-content flex flex-col tour-step-16 tour-step-17 tour-step-18 normal-bg",
423+
{
424+
'star-sky': theme.includes('ab'),
425+
'view-mode': !showUnranked,
426+
'h-screen': showUnranked,
427+
}
424428
)}>
425429

426430
{theme.includes("ab") &&
@@ -597,7 +601,7 @@ const App: React.FC = () => {
597601
</Suspense>
598602
)}
599603

600-
{(modalState.sortTour.isOpen || modalState.sortTour.hasRendered) && (
604+
{(modalState.sortTour.isOpen || modalState.sortTour.hasRendered) && (
601605
<Suspense fallback={<div />}>
602606
<LazyJoyrideTourSort
603607
openSortModal={openSorterModal}
@@ -617,8 +621,8 @@ const App: React.FC = () => {
617621
onClose={closeSorterModal}
618622
initialItems={getItemsToSort()}
619623
/>
620-
621-
{/* <CanvasDevModal
624+
625+
{/* <CanvasDevModal
622626
isOpen={isDevModalOpen}
623627
onClose={() => setIsDevModalOpen(false)}
624628
/> */}

src/index.css

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
@import 'tailwindcss/utilities';
44

55
html {
6-
padding: env(safe-area-inset);
6+
padding-left: env(safe-area-inset-left);
7+
padding-right: env(safe-area-inset-right);
78
}
89

910
html,
@@ -76,13 +77,30 @@ code {
7677
height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
7778
overflow: hidden;
7879
max-height: -webkit-fill-available;
79-
/* background: radial-gradient(ellipse at bottom, #28355E 0%, #06070d 100%); */
8080
background: radial-gradient(ellipse at bottom, var(--er-ranked-bg-end) 0%, var(--er-nav-gradient-start) 100%);
8181
background-size: 100% 100%;
8282
background-repeat: no-repeat;
8383
animation: bg-pulse 10s infinite ease-in-out;
8484
}
8585

86+
/* Ranked list / view mode: extend the container through the full
87+
*/
88+
.normal-bg.view-mode {
89+
padding-bottom: 0;
90+
height: 100lvh;
91+
max-height: none;
92+
min-height: 100lvh;
93+
overflow: hidden;
94+
}
95+
96+
/* Override the --vh-based height cap in view mode so the container
97+
can extend behind the iOS Safari toolbar */
98+
.site-content.view-mode {
99+
max-height: none;
100+
min-height: 100lvh;
101+
height: 100lvh;
102+
}
103+
86104
/* GRADIENT BACKGROUNDS - THEMED */
87105
.choice-background {
88106
background: linear-gradient(155deg, var(--er-choice-bg-1), var(--er-choice-bg-2), var(--er-choice-bg-3)), url(/noise.svg);
@@ -432,6 +450,12 @@ code {
432450
background: linear-gradient(to bottom, var(--er-ranked-bg-start), var(--er-ranked-bg-end));
433451
}
434452

453+
/* In view mode, add bottom padding inside the scrollable list so
454+
the last card isn't stuck behind the iOS Safari toolbar */
455+
.view-mode .ranked-items-background {
456+
padding-bottom: calc(env(safe-area-inset-bottom) + 1rem);
457+
}
458+
435459
.ranked-bar-background {
436460
/* Empty - can add themed gradient if needed */
437461
}

0 commit comments

Comments
 (0)