Skip to content

Commit

Permalink
fix(drawer): invalid margin declaration when rendering server-side (#…
Browse files Browse the repository at this point in the history
…8324)

Fixes the margins of a drawer container being declared as `marginLeft` and `marginRight` when rendering on the server side.
  • Loading branch information
crisbeto authored and jelbourn committed Nov 20, 2017
1 parent bb504ad commit 5600b80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/sidenav/drawer.ts
Expand Up @@ -62,8 +62,8 @@ export class MatDrawerToggleResult {
template: '<ng-content></ng-content>',
host: {
'class': 'mat-drawer-content',
'[style.marginLeft.px]': '_margins.left',
'[style.marginRight.px]': '_margins.right',
'[style.margin-left.px]': '_margins.left',
'[style.margin-right.px]': '_margins.right',
},
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/sidenav/sidenav.ts
Expand Up @@ -23,8 +23,8 @@ import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion
template: '<ng-content></ng-content>',
host: {
'class': 'mat-drawer-content mat-sidenav-content',
'[style.marginLeft.px]': '_margins.left',
'[style.marginRight.px]': '_margins.right',
'[style.margin-left.px]': '_margins.left',
'[style.margin-right.px]': '_margins.right',
},
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
Expand Down

0 comments on commit 5600b80

Please sign in to comment.