Hacker News new | ask | show | jobs
by verticalscaler 864 days ago
Good news everyone!

https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...

  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.

2 comments

We did have them 25 years ago.

https://learn.microsoft.com/en-us/previous-versions/windows/...

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.

Bit more info here: https://www.htmlgoodies.com/javascript/dhtml-transitions/

Example to add a 1 second random fade-in:

  <META HTTP-EQUIV=”Site-Enter” content=”revealTrans(Duration=1.0,Transition=23)”>
Time is a flat circle ;)
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