Skip to content

Commit cfe6c1d

Browse files
crisbetojosephperrott
authored andcommitted
fix(sidenav): box shadow visible while closed when rendering on the server (#10969)
1 parent 7d2c31e commit cfe6c1d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/sidenav/drawer-animations.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ export const matDrawerAnimations: {
2121
/** Animation that slides a drawer in and out. */
2222
transformDrawer: trigger('transform', [
2323
state('open, open-instant', style({
24-
transform: 'translate3d(0, 0, 0)',
25-
visibility: 'visible',
24+
'transform': 'translate3d(0, 0, 0)',
25+
'visibility': 'visible',
2626
})),
2727
state('void', style({
28-
visibility: 'hidden',
28+
// Avoids the shadow showing up when closed in SSR.
29+
'box-shadow': 'none',
30+
'visibility': 'hidden',
2931
})),
3032
transition('void => open-instant', animate('0ms')),
3133
transition('void <=> open, open-instant => void',

0 commit comments

Comments
 (0)