环境变量函数env()

<meta name="viewport" content="viewport-fit=cover">
padding-left: env(SAFE-AREA-INSET-LEFT, 50px);

calc

// 适配iPhoneX safe area
/* stylelint-disable */
@mixin x-padding-bottom($val:0px) {
  padding-bottom: $val;
  padding-bottom: calc(#{$val / 2} + constant(safe-area-inset-bottom)); /* no */
  padding-bottom: calc(#{$val / 2} + env(safe-area-inset-bottom)); /* no */
}

扩展阅读