The restart button is just navigating back to the same URL, the white flash is your browser showing white in between two pages.
I don't know why browsers do that, it seems like they should be able to hold the old background color until the first paint of the new page. I also have had this annoyance going from one dark mode site to another that it just flashes pure white in between.
Note: The View Transitions API doesn't currently enable cross-document view transitions, but this is planned for a future level of the spec and is actively being worked on.
Ah, this bit didn't make it into the current spec. See you in 2034.
I suppose we could have had this 25 years ago. It is almost as if web browsers are sabotaged in subtle ways, but who would try and mess with such an important platform.
The documentation there may not make it clear, but you could do things like navigate from one page to the next, and fade in the new page, from a normal full page reload, with no intermediate flash of unstyled anything.
It was part of the attempt to lock the web into DirectX and even Microsoft themselves deprecated this a long time ago. But it definitely worked. I remember playing with it. IE4 though IE6-ish had a lot of weird stuff in it to try to drive lock in.
Transitions API is more about supporting hero animations which others native apps and SPAs can have.
I want something much simpler: if navigating between documents and it would reset to pure white then just hold the previous documents background color instead. Neither the outgoing or incoming site should have to opt in to anything for this, and it'll avoid the hell flash when going from darkmode reddit to some other darkmode site
I've been noticing it more lately - especially at night if the room is darker. It seems like it has gotten worse lately so I was wondering if there had been some kind of change or I'm just noticing it more.
Cool idea btw! Combining tween + web-sys, that too up and running in 5 days. Kudos!