Skip to content

md-sidenav-container > div.mat-drawer-content unwanted margin #6958

@mohitook

Description

@mohitook

Bug, feature request, or proposal:

bug

What is the expected behavior?

There should be no unnecessary margin between the sidenav and the normal content.

What is the current behavior?

image

What are the steps to reproduce?

`

<button md-button routerLink="/">
  <md-icon>home</md-icon> 
      {{title}}</button>

  <!-- This fills the remaining space of the current row -->
  <span class="fill-remaining-space"></span>
  <div fxLayout="row" fxShow="false" fxShow.gt-sm>
      <button md-button routerLink="/products">Products</button>
      <button md-button routerLink="/dashboard">Dashboard</button>
  </div>
  <button md-button [md-menu-trigger-for]="menu" fxHide="false" fxHide.gt-sm>
   <md-icon>menu</md-icon>
  </button>

<md-menu x-position="before" #menu="mdMenu">
Products
Dashboard

menu
<!-- https://github.com/angular/material2/issues/1130 -->
<md-sidenav #sidenav class="app-sidenav"  mode="{{isMobileView?'over':'side'}}" opened="{{!isMobileView}}" disableClose="{{!isMobileView}}">
  <md-nav-list >
      <a md-list-item (click)="onLinkClick(sidenav)" >Majom Csimpánz Viziló</a>
      <a md-list-item href="page2.html">Page 2</a>
      <a md-list-item href="page3.html">Page 3</a>
  </md-nav-list>
</md-sidenav>
    
      <div class="app-content" style="padding-top:50px;"
      >
      <router-outlet></router-outlet>
    </div>

`

Please ignore the unnecessary codes.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

newest

Is there anything else we should know?

After I resize the window and the sidenav goes to mobile mode, and back -> the unwanted margin is gone...

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions