-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
Description
safe-area-insets-* is the defines for visible rectangle such as cutout support. But I guess that it is unclear for embedded document by iframe.
- Chrome seems to be 0 in embedded (child) document by
iframe. - Safari seem be same value for parent document and embedded (child) document.
What correct behaviour for embedded document?
parent
...
<meta name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<style>
body {
padding: 10px;
margin: 0px;
}
iframe {
padding: 0px;
margin: 0px;
border: none;
}
</style>
<iframe width="100%" height="100%" src="child.html"></iframe>
...
child / embedded document
...
<style>
#content {
padding-right: env(safe-area-inset-right);
padding-left: env(safe-area-inset-left);
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
}
</style>
<div id="content">
...