Skip to content

Commit 7029201

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)
1 parent 66f0b8c commit 7029201

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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%;
@@ -49,6 +55,7 @@ body {
4955
cursor: default;
5056
opacity: 1;
5157
transition: opacity var(--transition-duration);
58+
animation: custom-elements-loaded 0 linear 250ms forwards;
5259

5360
// Fix for strange element window offset
5461
&.pages.edit {
@@ -61,7 +68,6 @@ body {
6168

6269
&:has(:not(:defined)) {
6370
opacity: var(--custom-elements-loaded, 0);
64-
animation: custom-elements-loaded 0 linear 250ms forwards;
6571
}
6672
}
6773

0 commit comments

Comments
 (0)