Nic Chan avatar Nic Chan

View transitions and stacking context: Why does my CSS View Transition ignore z-index?

Screenshot of “View transitions and stacking context: Why does my CSS View Transition ignore z-index?”

Paint order, the order in which your elements are painted, cannot be easily calculated without applying a complex algorithm, especially since many uses of View Transitions involve transitioning between pages. There isn't really a way to figure out the shared stacking context between two pages, because if we had to consider the z-index of every page simultaneously to account for every possible transition, our heads/computers might explode.