Skip to content

Commit 34c0a67

Browse files
Elliott Marquezcopybara-github
authored andcommitted
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
1 parent 36dd77e commit 34c0a67

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

elevation/internal/_elevation.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
$exclude-custom-properties: false,
3131
);
3232

33-
:host {
34-
display: flex;
35-
pointer-events: none;
36-
}
37-
3833
:host,
3934
.shadow,
4035
.shadow::before,
@@ -47,6 +42,12 @@
4742
transition-timing-function: inherit;
4843
}
4944

45+
:host {
46+
display: flex;
47+
pointer-events: none;
48+
transition-property: box-shadow, opacity;
49+
}
50+
5051
.shadow::before,
5152
.shadow::after {
5253
content: '';

0 commit comments

Comments
 (0)