UX: Prevent overlap between splash loader and splash text on some browsers (#17340)

Context: https://meta.discourse.org/t/show-a-loader-starting-page-for-slow-connections/42981/23?u=johani

Not all browsers respect padding on absolute elements.

There are no visual/function changes. This PR just changes the implementation to prevent the overlap on some browsers.
This commit is contained in:
Joe 2022-07-05 22:41:43 +08:00 committed by GitHub
parent 2a7fb4bf3a
commit 4acf2394e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,8 +24,7 @@
height: 100vh;
}
#d-splash .preloader-text {
padding-top: 4em;
#d-splash .preloader-text-wrapper {
position: absolute;
opacity: 0;
animation: fade-in 0.5s ease-in-out;
@ -35,11 +34,14 @@
color: var(--primary);
}
#d-splash .preloader-text {
padding-top: 4em;
}
#d-splash .preloader-text:after {
animation: loading-text 3s infinite;
content: "";
position: absolute;
top: 4em;
margin: 0 0.1em;
left: 100%;
}
@ -80,8 +82,8 @@
alt="<%=SiteSetting.title%>"
/>
<div class="preloader-text">
<span> <%= I18n.t("js.preloader_text") %> </span>
<div class="preloader-text-wrapper">
<div class="preloader-text"><%= I18n.t("js.preloader_text") %></div>
</div>
<noscript>