#CSS `preload` issues with View Transitions

2 messages · Page 1 of 1 (latest)

twin lava
#

When using view transitions on our site, we were getting a strange FOUC where it looked like our styles were reloading on every transition after the swap occurred (or at least in the middle of it). We noticed it was only happening for styles that were loaded where rel="preload stylesheet" but not to styles where that attribute was just rel="stylesheet". Sure enough, after removing the "preload" we get the smooth expected swap behavior.

Anyone have any insight on why this might be happening? Can/should we not preload styles with view transitions?

grave birch
#

Are you able to share a repo or create an example e.g. StackBlitz? Also is that rel="preload stylesheet" what you're using? It should just be preload with the resource you're preloading - the stylesheet is loaded with a separate link tag