Skip to content

Commit

Permalink
fix(Navbar): positioning on older devices
Browse files Browse the repository at this point in the history
  • Loading branch information
kKaskak committed Jan 15, 2025
1 parent 92a6d6f commit 8c1b6fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/App/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

// iOS pads the bottom inset more than needed, so we deduce the actual inset size when using the webapp
@calculated-bottom-safe-inset: ~"min(env(safe-area-inset-bottom, 0rem), max(1rem, calc(100lvh - 100svh - env(safe-area-inset-top, 0rem))))";
@calculated-bottom-safe-inset: ~"min(env(safe-area-inset-bottom, 0rem), max(1rem, calc(var(--viewport-height-diff) - env(safe-area-inset-top, 0rem))))";

// Viewport sizes
@viewport-width: ~"100vw";
Expand Down Expand Up @@ -79,6 +79,7 @@
--large-viewport-height: @viewport-height;
--small-viewport-width: @viewport-width;
--small-viewport-height: @viewport-height;
--viewport-height-diff: calc(100vh - 100vh);

@supports (height: 100dvh) {
--dynamic-viewport-width: 100dvw;
Expand All @@ -94,6 +95,10 @@
--small-viewport-width: 100svw;
--small-viewport-height: 100svh;
}

@supports (height: 100lvh) and (height: 100svh) {
--viewport-height-diff: calc(100lvh - 100svh);
}
}

* {
Expand Down

0 comments on commit 8c1b6fc

Please sign in to comment.