one-aalam / astro-ink

Crisp, minimal, personal blog theme for Astro

Home Page:https://astro-ink.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dark theme delay

AymaneHrouch opened this issue · comments

When you choose the dark theme and tries to navigate the pages, it always starts with a white theme, then after like 0.5 switch to the dark theme.

Hey @AymaneHrouch Astro ink produces static/SSG builds, and the delay you're experiencing is inevitable to happen for stuff that's client-side JS dependent. When we load a page it's loaded first without JS, and then made interactive(Astro Islands). The Dark theme is purely a client-side implementation and the Flash of White/Dark content before the correct theme is applied, is the time it's taking for the JS to be ready.

Hope, this clarifies the reason for delayed application?

Thank you for your interest in astro-ink

Thank you for the clarification, I like astro-ink :)