diff --git a/src/App/styles.less b/src/App/styles.less index 0572ee3d1..a413ed163 100644 --- a/src/App/styles.less +++ b/src/App/styles.less @@ -23,8 +23,8 @@ // HTML sizes @html-width: ~"calc(max(var(--small-viewport-width), var(--dynamic-viewport-width)))"; @html-height: ~"calc(max(var(--small-viewport-height), var(--dynamic-viewport-height)))"; -@html-standalone-width: ~"calc(max(100%, var(--large-viewport-width)))"; -@html-standalone-height: ~"calc(max(100%, var(--large-viewport-height)))"; +@html-standalone-width: ~"calc(max(100%, var(--small-viewport-width)))"; +@html-standalone-height: ~"calc(max(100%, var(--small-viewport-height)))"; // Safe area insets @safe-area-inset-top: env(safe-area-inset-top, 0rem); @@ -64,7 +64,6 @@ --modal-background-color: rgba(15, 13, 32, 1); --outer-glow: 0px 0px 15px rgba(123, 91, 245, 0.37); --border-radius: 0.75rem; - --calculated-bottom-safe-inset: @calculated-bottom-safe-inset; --top-overlay-size: @top-overlay-size; --bottom-overlay-size: @bottom-overlay-size; --overlap-size: @overlap-size; @@ -99,6 +98,10 @@ @supports (height: 100lvh) and (height: 100svh) { --viewport-height-diff: calc(100lvh - 100svh); } + + @media (display-mode: standalone) { + --safe-area-inset-bottom: @calculated-bottom-safe-inset; + } } * { @@ -174,7 +177,7 @@ html { position: absolute; top: calc(1.2 * var(--horizontal-nav-bar-size) + var(--safe-area-inset-top)); right: var(--safe-area-inset-right); - bottom: calc(1.2 * var(--horizontal-nav-bar-size) + var(--calculated-bottom-safe-inset, 0rem)); + bottom: calc(1.2 * var(--horizontal-nav-bar-size) + var(--safe-area-inset-bottom, 0rem)); left: auto; z-index: 1; padding: 0 calc(0.5 * var(--horizontal-nav-bar-size)); diff --git a/src/components/BottomSheet/BottomSheet.less b/src/components/BottomSheet/BottomSheet.less index 6428e5081..f7e3315e1 100644 --- a/src/components/BottomSheet/BottomSheet.less +++ b/src/components/BottomSheet/BottomSheet.less @@ -101,7 +101,7 @@ @media only screen and (orientation: landscape) { .bottom-sheet { .container { - max-width: 90%; + max-width: calc(90% - var(--safe-area-inset-left) - var(--safe-area-inset-right)); } } } \ No newline at end of file diff --git a/src/components/MainNavBars/MainNavBars.less b/src/components/MainNavBars/MainNavBars.less index 2ee57b505..a5495bc69 100644 --- a/src/components/MainNavBars/MainNavBars.less +++ b/src/components/MainNavBars/MainNavBars.less @@ -6,9 +6,9 @@ position: relative; z-index: 0; overflow: clip; - margin-left: env(safe-area-inset-left, 0px); - margin-right: env(safe-area-inset-right, 0px); - width: calc(100% - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); + margin-left: var(--safe-area-inset-left); + margin-right: var(--safe-area-inset-right); + width: calc(100% - var(--safe-area-inset-left) - var(--safe-area-inset-right)); height: 100%; .horizontal-nav-bar { @@ -22,14 +22,14 @@ .vertical-nav-bar { position: absolute; top: var(--horizontal-nav-bar-size); - bottom: var(--calculated-bottom-safe-inset); + bottom: 0; left: 0; z-index: 1; } .nav-content-container { position: absolute; - padding-top: calc(var(--horizontal-nav-bar-size) + env(safe-area-inset-top, 0px)); + padding-top: calc(var(--horizontal-nav-bar-size) + var(--safe-area-inset-top)); top: 0; right: 0; bottom: 0; diff --git a/src/routes/Addons/styles.less b/src/routes/Addons/styles.less index 37152eb8f..6a057d292 100644 --- a/src/routes/Addons/styles.less +++ b/src/routes/Addons/styles.less @@ -22,7 +22,7 @@ } .addons-container { - height: 100%; + height: calc(100% - var(--safe-area-inset-bottom)); background-color: transparent; .addons-content { diff --git a/src/routes/Board/styles.less b/src/routes/Board/styles.less index 8ee280d86..ac6b08e59 100644 --- a/src/routes/Board/styles.less +++ b/src/routes/Board/styles.less @@ -13,7 +13,7 @@ .board-container { width: 100%; - height: 100%; + height: calc(100% - var(--safe-area-inset-bottom)); display: flex; flex-direction: column; diff --git a/src/routes/Calendar/Calendar.less b/src/routes/Calendar/Calendar.less index b606fa2aa..4763353f1 100644 --- a/src/routes/Calendar/Calendar.less +++ b/src/routes/Calendar/Calendar.less @@ -3,8 +3,7 @@ @import (reference) '~stremio/common/screen-sizes.less'; .calendar { - width: 100%; - height: 100%; + height: calc(100% - var(--safe-area-inset-bottom)); background-color: transparent; .content { diff --git a/src/routes/Discover/styles.less b/src/routes/Discover/styles.less index 05f03baf0..62e3adaee 100644 --- a/src/routes/Discover/styles.less +++ b/src/routes/Discover/styles.less @@ -17,7 +17,7 @@ } .discover-container { - height: 100%; + height: calc(100% - var(--safe-area-inset-bottom)); background-color: transparent; .discover-content { diff --git a/src/routes/Library/styles.less b/src/routes/Library/styles.less index 6719932e1..2bdbc13ec 100644 --- a/src/routes/Library/styles.less +++ b/src/routes/Library/styles.less @@ -13,7 +13,7 @@ } .library-container { - height: 100%; + height: calc(100% - var(--safe-area-inset-bottom)); background-color: transparent; .library-content { diff --git a/src/routes/MetaDetails/styles.less b/src/routes/MetaDetails/styles.less index 3e2fb1602..82740275b 100644 --- a/src/routes/MetaDetails/styles.less +++ b/src/routes/MetaDetails/styles.less @@ -52,7 +52,7 @@ flex-direction: row; margin-top: calc(var(--top-overlay-size) * -1); padding-top: var(--top-overlay-size); - padding-bottom: var(--calculated-bottom-safe-inset, 0rem); + padding-bottom: var(--safe-area-inset-bottom, 0rem); .vertical-nav-bar { flex: none; } diff --git a/src/routes/Settings/styles.less b/src/routes/Settings/styles.less index 7cdd0b7d4..de37d17c2 100644 --- a/src/routes/Settings/styles.less +++ b/src/routes/Settings/styles.less @@ -13,7 +13,7 @@ } .settings-container { - height: 100%; + height: calc(100% - var(--safe-area-inset-bottom)); width: 100%; background-color: transparent;