From b6875e62dcd843d972375094f8fb3ba7fdfe20fd Mon Sep 17 00:00:00 2001 From: Markus Cisler Date: Sat, 6 Oct 2018 09:14:32 +0000 Subject: [PATCH] Respect constraints on webkit/iPhone X(s) This adds limited support to respect constraints on newer iPhones, especially when used as PWA. --- css/glowingbear.css | 4 ++++ index.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/css/glowingbear.css b/css/glowingbear.css index 4a54289..bee10d0 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -223,7 +223,9 @@ input[type=text], input[type=password], #sendMessage { overflow-y: auto; overflow-x: hidden; padding-top: 35px; /* topbar */ + padding-right: env(safe-area-inset-right); padding-bottom: 1px; /* need to force a padding here */ + padding-left: env(safe-area-inset-left); font-size: smaller; transition:0.2s ease-in-out; z-index: 2; @@ -333,6 +335,7 @@ input[type=text], input[type=password], #sendMessage { .content { height: 100%; min-height: 100%; + padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); } #bufferlines { @@ -388,6 +391,7 @@ td.time { bottom: 0; height: 35px; width: 100%; + margin-bottom: env(safe-area-inset-bottom); /* margin for home-indicator on iPhone X */ -webkit-transition:0.2s ease-in-out all; transition:0.2s ease-in-out all; z-index: 1; diff --git a/index.html b/index.html index 896e178..77e92fe 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - +