iphoneX css spacing - "Unexpected character sequence" error

Hi there,

This is not an ionic question per se but I assume most ios developers dealt with the iphoneX spacing issues. I have the below code in the css file of a component.

@supports(padding: max(0px)) {
.safeAreaPaddingClass {
padding-top: max(2vw, env(safe-area-inset-top));
padding-bottom: max(2vw, env(safe-area-inset-bottom));

However, I get the following error at build:
“env(safe-area-inset-top)” is not a number for `max’

Aso, the Visual studio gives “Unexpected character sequence” error.

Has anybody dealt with a similar issue?