|
|
@@ -62,10 +62,10 @@ export function computeSafeAreaMetrics() {
|
|
|
export function applySafeAreaCssVars(metrics) {
|
|
|
if (typeof document === 'undefined' || !document?.documentElement) return
|
|
|
const root = document.documentElement.style
|
|
|
- root.setProperty('--sq-safe-top', `${metrics.topSafeHeight}px`)
|
|
|
- root.setProperty('--sq-nav-height', `${metrics.navContentHeight}px`)
|
|
|
- root.setProperty('--sq-header-height', `${metrics.headerHeight}px`)
|
|
|
- root.setProperty('--sq-capsule-right-safe', `${metrics.capsuleRightSafeWidth}px`)
|
|
|
+ const style = buildSafeAreaCssVarsStyle(metrics)
|
|
|
+ Object.entries(style).forEach(([key, value]) => {
|
|
|
+ root.setProperty(key, value)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
export function initGlobalSafeArea() {
|