Home > other >  PWA specific CSS
PWA specific CSS

Time:04-18

I have a react web app I'm building that has a bottom menu bar. While it works fine within the mobile browsers if it's rendered as a PWA on iOS which features the bottom swipe bar it obscures the buttons and prevents proper use.

Browser menu. No spacing needed.

versus the PWA version

PWA menu. Padding needed to raise the menu buttons.

Is there a way to only target the PWA version to leave specific styling for the bottom menu to pad the space for room so the system interaction bar is not over top of my UI? I'm struggling to think of what I can target to only affect the PWA.

CodePudding user response:

Use safe-area-inset-bottom to avoid displaying controls under mobile control elements.

For example env(safe-area-inset-bottom) can be used in CSS to know how much padding to put below your bottom bar.

  • Related