blog.grace.moe

Source for the blog blog.grace.moe
git clone https://git.grace.moe/blog.grace.moe
Log | Files | Refs

commit a937cb6ac18618e9a22f2d5d63f5448d02d85a95
parent f3afcf007c732bb044e88e030027451bb3e4a4f0
Author: gracefu <81774659+gracefuu@users.noreply.github.com>
Date:   Thu, 10 Apr 2025 05:58:17 +0800

Properly implement the .font-loading trick

Diffstat:
Mlayouts/templates/base.shtml | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layouts/templates/base.shtml b/layouts/templates/base.shtml @@ -96,7 +96,6 @@ h1, h2, h3, h4, h5, h6 { } </style> - <script>document.querySelector('body').classList.add('font-loading');</script> <style> html { font-family: 'Atkinson Hyperlegible Next', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; @@ -207,5 +206,6 @@ font.load().then(function () { <div id="content"> <super> </div> + <script>document.querySelector('body').classList.add('font-loading');</script> </body> </html>