z-index ignored because of a transform on the parent
I have a modal with z-index: 9999 that renders behind a sticky header with z-index: 100. The modal is inside a card that has transform: translateY(0) on it for a hover animation. Remove the transform and the modal jumps in front. I vaguely know transform creates a stacking context but I do not understand why that makes child z-index irrelevant to the outside world.
4 replies