How to Configure Strict CSS View-Transition-Image-Pair in Google Chrome

In modern web applications featuring animated view transitions, blending old and new visual snapshots smoothly without unsightly ghosting or colour clipping is crucial for aesthetic polish. In the View Transitions API supported by Google Chrome, the ::view-transition-image-pair(<name>) pseudo-element functions as the intermediary blending and isolation container that holds both the incoming and outgoing raster snapshots. Mastering strict CSS styling, blend modes, and isolation properties on image pairs ensures flawless visual cross-fades during DOM mutations.

The Structural Role of the Image Pair Pseudo-Element

Inside the view transition pseudo-element hierarchy, each named transition branch generates an image pair container:

::view-transition
└── ::view-transition-group(hero-card)
    └── ::view-transition-image-pair(hero-card)
        ├── ::view-transition-old(hero-card)
        └── ::view-transition-new(hero-card)

The ::view-transition-image-pair pseudo-element establishes an independent stacking context and CSS isolation group. By default, it applies isolation: isolate, ensuring that mix-blend-mode interactions between the old and new image snapshots do not bleed outward onto adjacent page elements.

Configuring Strict Blend Modes and Isolation

When transitioning between dark and light theme palettes, or morphing vibrant graphic assets, standard linear opacity cross-fades can produce a momentary muddy grey wash. Applying specialized blend modes directly to the image pair corrects this optical artefact:

/* Assign custom transition name */
.feature-showcase-card {
  view-transition-name: showcase-morph;
}

/* Configure strict blend mode on the image pair */
::view-transition-image-pair(showcase-morph) {
  isolation: isolate;
  background-color: transparent;
}

/* Cross-fade snapshots with optical luminance preservation */
::view-transition-old(showcase-morph) {
  animation: 0.3s ease-out both fade-out;
  mix-blend-mode: plus-lighter;
}

::view-transition-new(showcase-morph) {
  animation: 0.3s ease-in both fade-in;
  mix-blend-mode: plus-lighter;
}

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

Using mix-blend-mode: plus-lighter inside the isolated image pair creates an organic luminous transition, maintaining crisp contrast throughout the animation cycle.

Managing Overflow and Clipping Boundaries

When morphing cards whose internal padding or corner radii change between states, snapshot bleeding can occur. Enforce strict border clipping on the image pair container:

::view-transition-image-pair(showcase-morph) {
  border-radius: 12px;
  overflow: hidden;
}

Auditing Image Pairs in Chrome DevTools

Google Chrome provides specialized DevTools tooling to inspect view transition layers:

  1. Open DevTools (F12) and navigate to the Animations drawer panel.
  2. Trigger the view transition and pause the animation timeline mid-flight.
  3. In the Elements panel, expand ::view-transition-group to reveal ::view-transition-image-pair.
  4. Inspect computed properties in the Styles tab to confirm that isolation: isolate is active and blend modes calculate accurately.
  5. Toggle snapshot visibility to audit old versus new image alignment independently.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.