I am wanting to use env(safe-area-inset-bottom) to add margin-bottom to an element, but only when the device is an iPhone X. However, the margin added using env(safe-area-inset-bottom) does not add enough to my liking, and I wish to add an additional 34px to the bottom margin.
margin-bottom: calc(env(safe-area-inset-bottom) + 34px);
The styling above does add the appropriate margin, however, when the device is not an iPhone X, the margin-bottom does not go back to 0px. This is because of calc(). Any suggestions? Thanks.
env(safe-area-inset-bottom)
, they are just more than likely reporting it as zero. Then zero is being added to 34px. Which'll make the margin-bottom on non-iPhone X devices 34px. – Incarcerate