env(safe-area-inset) always 0px when in portrait mode

Viewed 112

I'm struggling with a problem for a couple hours now. The env(safe-area-inset-bottom), env(safe-area-inset-top) etc. all keeps being 0px on safari 15. I tried to console.log them to keep track of changes, but the only change happens when I switch to landscape mode. When I switch back to portrait, all the values are back to 0px. I already tried the viewport-fit=cover etc.

Please someone help!

0 Answers
Related