Spaces:
Paused
Paused
icebear0828 Claude Opus 4.6 commited on
Commit ·
bb065fa
1
Parent(s): e7285df
fix: prevent icon text flash (FOUC) on initial page load
Browse filesHide Material Symbols icons until the font loads via CSS Font Loading
API, then fade them in — prevents "check_circle" etc. showing as text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- public/dashboard.html +5 -0
public/dashboard.html
CHANGED
|
@@ -34,6 +34,10 @@
|
|
| 34 |
:root { --primary: 16 162 53; --primary-hover: 14 140 46; }
|
| 35 |
.dark { --primary: 16 163 127; --primary-hover: 14 140 108; }
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
/* Dark scrollbar for code blocks */
|
| 38 |
pre::-webkit-scrollbar { height: 8px; }
|
| 39 |
pre::-webkit-scrollbar-track { background: #0d1117; }
|
|
@@ -47,6 +51,7 @@
|
|
| 47 |
if (t === 'dark' || (!t && window.matchMedia('(prefers-color-scheme: dark)').matches))
|
| 48 |
document.documentElement.classList.add('dark');
|
| 49 |
} catch {}
|
|
|
|
| 50 |
</script>
|
| 51 |
</head>
|
| 52 |
<body class="bg-bg-light dark:bg-bg-dark font-display text-slate-900 dark:text-text-main antialiased min-h-screen flex flex-col transition-colors">
|
|
|
|
| 34 |
:root { --primary: 16 162 53; --primary-hover: 14 140 46; }
|
| 35 |
.dark { --primary: 16 163 127; --primary-hover: 14 140 108; }
|
| 36 |
|
| 37 |
+
/* Hide icon ligature text until font loads */
|
| 38 |
+
.material-symbols-outlined { opacity: 0; }
|
| 39 |
+
.fonts-ready .material-symbols-outlined { opacity: 1; transition: opacity 0.15s; }
|
| 40 |
+
|
| 41 |
/* Dark scrollbar for code blocks */
|
| 42 |
pre::-webkit-scrollbar { height: 8px; }
|
| 43 |
pre::-webkit-scrollbar-track { background: #0d1117; }
|
|
|
|
| 51 |
if (t === 'dark' || (!t && window.matchMedia('(prefers-color-scheme: dark)').matches))
|
| 52 |
document.documentElement.classList.add('dark');
|
| 53 |
} catch {}
|
| 54 |
+
document.fonts.ready.then(() => document.documentElement.classList.add('fonts-ready'));
|
| 55 |
</script>
|
| 56 |
</head>
|
| 57 |
<body class="bg-bg-light dark:bg-bg-dark font-display text-slate-900 dark:text-text-main antialiased min-h-screen flex flex-col transition-colors">
|