 The first feature is transition behavior, unlike when animating discrete properties with keyframes. To transition discrete properties like display, you'll need to use the allow discrete value for transition behavior. Then the starting style rule is used to animate entry effects from display none. And into the top layer, use starting style to apply a style that the browser can look up before the element is open on the page. Finally, to fade out a popover or dialogue from the top layer, add the overlay property to your list of transitions. Include overlay in the transition or animation to animate overlay along with the rest of the features and ensure it stays in the top layer when animating. This will look much smoother.