MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / updateSheetOffsetTop

Method updateSheetOffsetTop

core/src/components/modal/modal.tsx:1477–1480  ·  view source on GitHub ↗

* Resolves the current root --ion-safe-area-top value and sets the * internal --ion-modal-offset-top property on the host element. * Called on present and on resize (e.g., device rotation changes safe-area).

()

Source from the content-addressed store, hash-verified

1475 * Called on present and on resize (e.g., device rotation changes safe-area).
1476 */
1477 private updateSheetOffsetTop(): void {
1478 const safeAreaTop = getRootSafeAreaTop();
1479 this.el.style.setProperty('--ion-modal-offset-top', `${safeAreaTop}px`);
1480 }
1481
1482 /**
1483 * Updates safe-area overrides during dynamic state changes.

Callers 2

onWindowResizeMethod · 0.95

Calls 1

getRootSafeAreaTopFunction · 0.90

Tested by

no test coverage detected