Skip to content

Commit 5600b80

Browse files
crisbetojelbourn
authored andcommitted
fix(drawer): invalid margin declaration when rendering server-side (#8324)
Fixes the margins of a drawer container being declared as `marginLeft` and `marginRight` when rendering on the server side.
1 parent bb504ad commit 5600b80

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib/sidenav/drawer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export class MatDrawerToggleResult {
6262
template: '<ng-content></ng-content>',
6363
host: {
6464
'class': 'mat-drawer-content',
65-
'[style.marginLeft.px]': '_margins.left',
66-
'[style.marginRight.px]': '_margins.right',
65+
'[style.margin-left.px]': '_margins.left',
66+
'[style.margin-right.px]': '_margins.right',
6767
},
6868
changeDetection: ChangeDetectionStrategy.OnPush,
6969
encapsulation: ViewEncapsulation.None,

src/lib/sidenav/sidenav.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion
2323
template: '<ng-content></ng-content>',
2424
host: {
2525
'class': 'mat-drawer-content mat-sidenav-content',
26-
'[style.marginLeft.px]': '_margins.left',
27-
'[style.marginRight.px]': '_margins.right',
26+
'[style.margin-left.px]': '_margins.left',
27+
'[style.margin-right.px]': '_margins.right',
2828
},
2929
changeDetection: ChangeDetectionStrategy.OnPush,
3030
encapsulation: ViewEncapsulation.None,

0 commit comments

Comments
 (0)