iPhone X : : Error : safe-area-inset property is not supported for this property?

1.5k Views Asked by At

For aligning html page on an iPhoneX, apple had provided the constants like constant(safe-area-inset-left),etc. This was working fine, last I checked in iOS 11.0.x. After updating to iOS 11.2, it has stopped working. I'm getting this error/warning in css "The value constant(safe-area-inset-left) is not supported by this property."

padding-left: constant(safe-area-inset-left) !important;

Viewport is also not working.

<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
1

There are 1 best solutions below

2
On BEST ANSWER

In iOS 11.2 constant(safe-area-inset-dir) is replaced by env(safe-area-inset-dir)