Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Handle notch / Dynamic Island on iPhone
Browse files Browse the repository at this point in the history
(cherry picked from commit 87cd118)
  • Loading branch information
queengooborg authored and foolip committed Mar 16, 2023
1 parent b510e96 commit b33fca9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ body {
min-height: 100vh;
margin: 0;
padding: 8px;

// Handle notch / dynamic island
padding-left: max(8px, env(safe-area-inset-left));
padding-right: max(8px, env(safe-area-inset-right));
}

h1,
Expand Down Expand Up @@ -230,7 +234,7 @@ footer {
background-color: rgb(0, 0, 0, 0.25);
width: 100vw;
margin-top: 1em;
margin-left: -8px;
margin-left: min(-8px, calc(env(safe-area-inset-left) * -1));

& > * {
display: inline-block;
Expand All @@ -246,7 +250,7 @@ footer {

hr {
width: 100vw;
margin-left: -8px;
margin-left: min(-8px, calc(env(safe-area-inset-left) * -1));
}

.paper {
Expand Down Expand Up @@ -394,6 +398,10 @@ hr {
.result {
margin-bottom: 0.5em;

summary {
word-break: break-all;
}

.result-value {
font-weight: bold;

Expand Down
2 changes: 1 addition & 1 deletion views/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See the LICENSE file for copyright details
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="description" content="Web API and CSS property feature detections to assist the @mdn/browser-compat-data project.">

<!-- Favicon -->
Expand Down

0 comments on commit b33fca9

Please sign in to comment.