Skip to content

A platform for community discussion. Free, open, simple.

UX: improve custom splash centering in PWAs (#39116)

Kris8b018c2ed7ba
diff --git a/app/views/common/_discourse_splash.html.erb b/app/views/common/_discourse_splash.html.erb
index 199e934093e..116f3871bd8 100644
--- a/app/views/common/_discourse_splash.html.erb
+++ b/app/views/common/_discourse_splash.html.erb
@@ -135,10 +135,13 @@
<%- unless splash_screen_image_animated? %>
margin-top: -10vh;
<%- end %>
+ @media (display-mode: standalone) {
+ transform: translateY(-5dvh);
+ }
<%- else %>
width: calc((var(--splash-dot-size) + var(--splash-dot-spacing)) * 5);
<%- end %>
- height: 100vh;
+ height: 100dvh;
background-size: cover;
}