From 34711b13feab8073f684738dc607532c3b16ea79 Mon Sep 17 00:00:00 2001 From: Andrea Di Cesare Date: Wed, 11 Sep 2024 09:23:39 +0200 Subject: [PATCH] :lipstick: Fix vh issue on ios safari --- _includes/head.html | 11 +++++++++++ css/main.scss | 7 ++++--- index.md | 9 ++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index cdeea76f..4f786c2d 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -56,4 +56,15 @@ {% include plausible.html %} + \ No newline at end of file diff --git a/css/main.scss b/css/main.scss index 3b802b90..56561c32 100644 --- a/css/main.scss +++ b/css/main.scss @@ -225,14 +225,15 @@ text-black { } .iframe-parent { - height: calc(100vh - 64px); + height: calc(var(--vh, 1vh) * 100 - 64px); // see https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ + height: calc(100vh - 64px); // fallback border: none; } iframe { margin-top: 0; // fix position about navbar in ios safari - height: calc(100vh - 64px); - max-height: calc(100vh - 64px); + height: calc(var(--vh, 1vh) * 100 - 64px); // see https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ + height: calc(100vh - 64px); // fallback width: 100%; border: none; } diff --git a/index.md b/index.md index 2fbb4b36..5b194588 100644 --- a/index.md +++ b/index.md @@ -43,23 +43,26 @@ stars-bounce: true -->