Skip to content

Commit 358fae2

Browse files
committed
fix(FOUC): Always register timeout animation
We need the animation to start regardless of the defined state of custom elements. Otherwise the animation will not start early enough. (cherry picked from commit 97210b0) # Conflicts: # app/assets/builds/alchemy/admin.css
1 parent c7d58ef commit 358fae2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

app/assets/builds/alchemy/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/stylesheets/alchemy/admin/base.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
@use "../mixins";
22

3+
@property --custom-elements-loaded {
4+
syntax: "<number>";
5+
inherits: true;
6+
initial-value: 0;
7+
}
8+
39
html {
410
box-sizing: border-box;
511
height: 100%;
@@ -46,6 +52,7 @@ body {
4652
cursor: default;
4753
opacity: 1;
4854
transition: opacity var(--transition-duration);
55+
animation: custom-elements-loaded 0 linear 250ms forwards;
4956

5057
// Fix for strange element window offset
5158
&.pages.edit {
@@ -58,7 +65,6 @@ body {
5865

5966
&:has(alchemy-spinner:not(:defined)) {
6067
opacity: var(--custom-elements-loaded, 0);
61-
animation: custom-elements-loaded 0 linear 250ms forwards;
6268
}
6369
}
6470

0 commit comments

Comments
 (0)