Hi I'am building a PWA with react and I've been trying to add a padding to my Footer to avoid the safe area, but for some reason it's always 0px;
I have these tags in HTML:
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="mobile-web-app-capable" content="yes">
And I'm trying to set the CSS like this for my footer:
padding-bottom: env(safe-area-inset-bottom);
It's always 0px!
UPDATE: I never really figured out why it wasn't working and how to fix, but I ended up creating a new React 18 project using the
npx create-react-app my-app --template cra-template-pwa-typescript
and it's working again.Refer to this official doc for more info: create-react-app.dev
Here's my react version