Skip to content

Commit a08a8db

Browse files
authored
fix: add extra padding on mobile (#4959)
1 parent a8746dd commit a08a8db

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

packages/shared/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"react-modal": "^3.14.3",
9797
"react-swipeable": "^7.0.1",
9898
"tailwindcss": "^3.4.14",
99+
"tailwindcss-safe-area": "0.8.0",
99100
"ts-jest": "^26.5.4",
100101
"typescript": "5.6.3"
101102
},

packages/shared/src/features/onboarding/shared/FunnelStepCtaWrapper.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ export function FunnelStepCtaWrapper({
5757
return (
5858
<div className="relative flex flex-1 flex-col gap-4">
5959
<div className={classNames('flex-1', containerClassName)}>{children}</div>
60-
<div
61-
className="sticky mx-auto my-4 flex w-full max-w-md flex-col gap-4 px-4"
62-
style={{
63-
bottom: `max(env(safe-area-inset-bottom, 0), .5rem)`,
64-
}}
65-
>
60+
<div className="sticky mx-auto my-4 flex w-full max-w-md flex-col gap-4 px-4 bottom-safe-or-2">
6661
{note}
6762
<Button
6863
className={classNames(className, cta?.animation, 'w-full')}

packages/shared/tailwind.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// eslint-disable-next-line import/no-extraneous-dependencies
22
import { type Config } from 'tailwindcss';
3+
// eslint-disable-next-line import/no-extraneous-dependencies
4+
import safeArea from 'tailwindcss-safe-area';
35
import colors from './tailwind/colors';
46
import boxShadow from './tailwind/boxShadow';
57
import caret from './tailwind/caret';
@@ -252,7 +254,7 @@ export default {
252254
},
253255
},
254256
// eslint-disable-next-line global-require
255-
plugins: [caret, typography, buttons],
257+
plugins: [caret, typography, buttons, safeArea],
256258
corePlugins: {
257259
invert: false,
258260
},

packages/webapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"prettier": "^2.6.2",
9999
"serwist": "^9.0.9",
100100
"tailwindcss": "^3.4.14",
101+
"tailwindcss-safe-area": "0.8.0",
101102
"ts-jest": "^26.5.4",
102103
"typescript": "5.6.3",
103104
"vercel": "^21.3.3"

packages/webapp/pages/opportunity/[id]/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,12 @@ const JobPage = (): ReactElement => {
339339
className={{
340340
buttons: 'flex-1',
341341
container:
342-
'fixed bottom-0 z-header flex min-h-14 w-full items-center gap-4 border-t border-border-subtlest-tertiary bg-background-default px-4 tablet:hidden',
342+
'fixed bottom-0 z-header flex min-h-14 w-full items-center gap-4 border-t border-border-subtlest-tertiary bg-background-default px-4 pt-2 pb-safe-or-2 tablet:hidden',
343343
}}
344344
size={ButtonSize.Medium}
345345
/>
346346
)}
347-
<div className="mx-auto flex w-full max-w-[69.25rem] flex-col gap-4 laptop:flex-row">
347+
<div className="z-0 mx-auto flex w-full max-w-[69.25rem] flex-col gap-4 pb-14 laptop:flex-row laptop:pb-0">
348348
<div className="h-full min-w-0 max-w-full flex-1 flex-shrink-0 rounded-16 border border-border-subtlest-tertiary">
349349
{/* Header */}
350350
<div className="flex min-h-14 items-center gap-4 border-b border-border-subtlest-tertiary p-3">

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)