From 34c0a6779e8a722ec6dfbf6ad5c0d1bb607289e6 Mon Sep 17 00:00:00 2001 From: Elliott Marquez Date: Wed, 6 Mar 2024 16:55:42 -0800 Subject: [PATCH] fix(elevation): limit elevation transition to box-shadow and opacity `transition-property: inherit` was causing issues where doing `visiblity: hidden` would animate with the shadow of the button. This change makes it such that we set the default properties to `box-shadow, opacity` on host so that it is still configuratble by the consumer of md-elevation. PiperOrigin-RevId: 613385695 --- elevation/internal/_elevation.scss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/elevation/internal/_elevation.scss b/elevation/internal/_elevation.scss index 497f7760a9..7d3cc6f280 100644 --- a/elevation/internal/_elevation.scss +++ b/elevation/internal/_elevation.scss @@ -30,11 +30,6 @@ $exclude-custom-properties: false, ); - :host { - display: flex; - pointer-events: none; - } - :host, .shadow, .shadow::before, @@ -47,6 +42,12 @@ transition-timing-function: inherit; } + :host { + display: flex; + pointer-events: none; + transition-property: box-shadow, opacity; + } + .shadow::before, .shadow::after { content: '';