Skip to content

Commit

Permalink
fix(elevation): limit elevation transition to box-shadow and opacity
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
Elliott Marquez authored and copybara-github committed Mar 7, 2024
1 parent 36dd77e commit 34c0a67
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions elevation/internal/_elevation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
$exclude-custom-properties: false,
);

:host {
display: flex;
pointer-events: none;
}

:host,
.shadow,
.shadow::before,
Expand All @@ -47,6 +42,12 @@
transition-timing-function: inherit;
}

:host {
display: flex;
pointer-events: none;
transition-property: box-shadow, opacity;
}

.shadow::before,
.shadow::after {
content: '';
Expand Down

0 comments on commit 34c0a67

Please sign in to comment.