Safe area
CSS values and a service for keeping content clear of the notch, status bar and home indicator. import { LynxSafeArea, SAFE_AREA_INSET_TOP, SAFE_AREA_INSET_BOTTOM, SAFE_AREA_INSET_LEFT, SAFE_AREA_INSET_RIGHT } from '@blotch/angular-lynx';
Usage
In a stylesheet, write the CSS directly: padding-top: env(safe-area-inset-top);.
API
SAFE_AREA_INSET_*
The CSS env() value for each inset, for style bindings in TypeScript.
LynxSafeArea
Device facts for layouts that adapt to the safe area. Reading platform throws outside Lynx, such as in unit tests, because it reads LynxSystemInfo.
LynxSafeArea.isNotchScreen
true when the host app reports a notch or screen cutout through its isNotchScreen global value. false when it reports none. Lynx Explorer and the apps from ng build --platform report it.
LynxSafeArea.platform
The platform, such as 'iOS', 'Android' or 'web'. Same as LynxSystemInfo.platform.
Types
PlatformType
The values are explained on the system info page.
Related
- Safe area: pad screens and fixed bars.
- System info
- Host data
