From 8bec30561e1d4f2e2d8e06207714d4f992c10df0 Mon Sep 17 00:00:00 2001 From: aymm Date: Sun, 6 Jun 2021 19:05:30 +0200 Subject: [PATCH] Fixed #20 dealt with the pill on iOS --- globals.php | 2 +- styles/style.css | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/globals.php b/globals.php index 500dd55..a7f9117 100644 --- a/globals.php +++ b/globals.php @@ -70,7 +70,7 @@ function get_page_header( . $favicons . ''.$title.'' . $script_str - . '' + . '' . '
' . $home_link . $new_poll_link diff --git a/styles/style.css b/styles/style.css index 08c0a88..20cb397 100644 --- a/styles/style.css +++ b/styles/style.css @@ -390,6 +390,29 @@ footer .sourcecode svg { stroke-width: 1.5em; } +/* Deal with the pill on iOS */ +@supports (padding: env(safe-area-inset-left)) { + @media (max-width: 1000px) { + header { + padding-left: max(env(safe-area-inset-left, 20px), 8px); + padding-right: env(safe-area-inset-right, 20px); + padding-top: calc(env(safe-area-inset-top, 20px) + 8px); + } + footer { + padding-left: calc(env(safe-area-inset-left, 20px) + 8px); + padding-right: env(safe-area-inset-right, 20px); + padding-bottom: max(env(safe-area-inset-bottom, 20px), 8px); + } + main { + padding-left: max(env(safe-area-inset-left, 20px), 8px); + padding-right: max(env(safe-area-inset-right, 20px), 8px); + } + body { + margin: 0; + } + } +} + /* Poll grid */ .poll-grid { display: flex;