material-components-web
material-components-web copied to clipboard
fix(menu): Fix open menu animation delay.
fix(menu): Fix open menu animation delay.
Re-ordered menu surface open classes to render --open
after --animating-open
to have more specificity for --open
.
Also moved setting position properties before adding --open
classes so the reflow does not interrupt CSS animation.
For reference here is the order of style changes.
idle: (#on render)
opacity: 0;
transform: scale(1);
--animating-open: (#on click)
opacity: 0;
transform: scale(.8);
--open: (#requestAnimationFrame)
opacity: 1;
transform: scale(1);
Closes #5682 and Closes #4411
can we solve PR?