Closed eps1lon closed 2 years ago
Congrats and thank you for your first PR, @eps1lon ! Appreciate you looking out for this sort of thing.
I want to provide a bit of context around why we deferred initially: Rather than load the script unnecessarily for all, we wanted to only load as needed (which trade off, as you identified, is flash).
I am going to ask a few folks with more niche performance knowledge in this to provide more prescriptive feedback to your PR, including @malchata ! stay tuned for feedback. Thank you!
Also fine with this. Is there an acronym for flash of unstyled light mode already?
🦠of aprroval
Instead of initializing the theme in a deferred script we now initialize it before any html is parsed. This prevents a flash of light mode when light mode is selected between the page being rendered and JS being executed.