Skip to content

Commit 25fd551

Browse files
committed
Safe Inset Areas: add fixed lines on trbl edges for reference
1 parent e649af3 commit 25fd551

File tree

4 files changed

+148
-0
lines changed

4 files changed

+148
-0
lines changed

demos/src/individual/safe-inset-areas/index.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,38 @@
4444
background-color: rgb(0 0 255 / 0.2);
4545
inset: 0;
4646
}
47+
48+
#bottom, #top {
49+
position: fixed;
50+
height: 5px;
51+
pointer-events: none;
52+
background: lime;
53+
z-index: 1;
54+
width: 75vw;
55+
left: 12.5vw;
56+
}
57+
#bottom {
58+
bottom: 0;
59+
}
60+
#top {
61+
top: 0
62+
}
63+
64+
#left, #right {
65+
position: fixed;
66+
width: 5px;
67+
pointer-events: none;
68+
background: hotpink;
69+
z-index: 1;
70+
height: 75vh;
71+
top: 12.5vh;
72+
}
73+
#left {
74+
left: 0;
75+
}
76+
#right {
77+
right: 0
78+
}
4779
</style>
4880
</head>
4981

@@ -61,6 +93,11 @@ <h1>No <code>viewport-fit</code></h1>
6193
<div id="fixer"></div>
6294
<div id="fixer0"></div>
6395

96+
<div id="top"></div>
97+
<div id="bottom"></div>
98+
<div id="left"></div>
99+
<div id="right"></div>
100+
64101
<button id="btnOptions">options</button>
65102
<dialog id="options">
66103
<header>

demos/src/individual/safe-inset-areas/viewport-fit-auto.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,38 @@
4444
background-color: rgb(0 0 255 / 0.2);
4545
inset: 0;
4646
}
47+
48+
#bottom, #top {
49+
position: fixed;
50+
height: 5px;
51+
pointer-events: none;
52+
background: lime;
53+
z-index: 1;
54+
width: 75vw;
55+
left: 12.5vw;
56+
}
57+
#bottom {
58+
bottom: 0;
59+
}
60+
#top {
61+
top: 0
62+
}
63+
64+
#left, #right {
65+
position: fixed;
66+
width: 5px;
67+
pointer-events: none;
68+
background: hotpink;
69+
z-index: 1;
70+
height: 75vh;
71+
top: 12.5vh;
72+
}
73+
#left {
74+
left: 0;
75+
}
76+
#right {
77+
right: 0
78+
}
4779
</style>
4880
</head>
4981

@@ -61,6 +93,11 @@ <h1><code>viewport-fit=auto</code></h1>
6193
<div id="fixer"></div>
6294
<div id="fixer0"></div>
6395

96+
<div id="top"></div>
97+
<div id="bottom"></div>
98+
<div id="left"></div>
99+
<div id="right"></div>
100+
64101
<button id="btnOptions">options</button>
65102
<dialog id="options">
66103
<header>

demos/src/individual/safe-inset-areas/viewport-fit-contain.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,38 @@
4444
background-color: rgb(0 0 255 / 0.2);
4545
inset: 0;
4646
}
47+
48+
#bottom, #top {
49+
position: fixed;
50+
height: 5px;
51+
pointer-events: none;
52+
background: lime;
53+
z-index: 1;
54+
width: 75vw;
55+
left: 12.5vw;
56+
}
57+
#bottom {
58+
bottom: 0;
59+
}
60+
#top {
61+
top: 0
62+
}
63+
64+
#left, #right {
65+
position: fixed;
66+
width: 5px;
67+
pointer-events: none;
68+
background: hotpink;
69+
z-index: 1;
70+
height: 75vh;
71+
top: 12.5vh;
72+
}
73+
#left {
74+
left: 0;
75+
}
76+
#right {
77+
right: 0
78+
}
4779
</style>
4880
</head>
4981

@@ -61,6 +93,11 @@ <h1><code>viewport-fit=contain</code></h1>
6193
<div id="fixer"></div>
6294
<div id="fixer0"></div>
6395

96+
<div id="top"></div>
97+
<div id="bottom"></div>
98+
<div id="left"></div>
99+
<div id="right"></div>
100+
64101
<button id="btnOptions">options</button>
65102
<dialog id="options">
66103
<header>

demos/src/individual/safe-inset-areas/viewport-fit-cover.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,38 @@
4444
background-color: rgb(0 0 255 / 0.2);
4545
inset: 0;
4646
}
47+
48+
#bottom, #top {
49+
position: fixed;
50+
height: 5px;
51+
pointer-events: none;
52+
background: lime;
53+
z-index: 1;
54+
width: 75vw;
55+
left: 12.5vw;
56+
}
57+
#bottom {
58+
bottom: 0;
59+
}
60+
#top {
61+
top: 0
62+
}
63+
64+
#left, #right {
65+
position: fixed;
66+
width: 5px;
67+
pointer-events: none;
68+
background: hotpink;
69+
z-index: 1;
70+
height: 75vh;
71+
top: 12.5vh;
72+
}
73+
#left {
74+
left: 0;
75+
}
76+
#right {
77+
right: 0
78+
}
4779
</style>
4880
</head>
4981

@@ -61,6 +93,11 @@ <h1><code>viewport-fit=cover</code></h1>
6193
<div id="fixer"></div>
6294
<div id="fixer0"></div>
6395

96+
<div id="top"></div>
97+
<div id="bottom"></div>
98+
<div id="left"></div>
99+
<div id="right"></div>
100+
64101
<button id="btnOptions">options</button>
65102
<dialog id="options">
66103
<header>

0 commit comments

Comments
 (0)