File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,15 @@ $fallbacks: m3-expansion.get-tokens();
5151 }
5252}
5353
54+ // Styles to use if grid isn't supported for some reason.
55+ @mixin _fallback-styles {
56+ height : 0 ;
57+
58+ .mat-expansion-panel.mat-expanded > & {
59+ height : auto ;
60+ }
61+ }
62+
5463.mat-expansion-panel-content-wrapper {
5564 // Note: we can't use `overflow: hidden` here, because it can clip content with
5665 // ripples or box shadows. Instead we transition the `visibility` below.
@@ -72,13 +81,14 @@ $fallbacks: m3-expansion.get-tokens();
7281 // we have a fallback to `height` which doesn't animate, just in case.
7382 // stylelint-disable material/no-prefixes
7483 @supports not (grid-template-rows : 0fr ) {
75- height : 0 ;
76-
77- .mat-expansion-panel.mat-expanded > & {
78- height : auto ;
79- }
84+ @include _fallback-styles ;
8085 }
8186 // stylelint-enable material/no-prefixes
87+
88+ // Use the fallback styles when printing, otherwise closed panel appear open (see #32327).
89+ @media print {
90+ @include _fallback-styles ;
91+ }
8292}
8393
8494.mat-expansion-panel-content {
You can’t perform that action at this time.
0 commit comments