angular / angular/components

bug/feature(sidenav) limited customization caused by 'mat-drawer-inner-container' element

Aperta
#13,983 18 commenti 17 reazioni 0 assegnatari Vedi su GitHub
area: material/sidenav P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### Bug, feature request, or proposal:
Bug or feature request

#### What is the expected behavior?
Sidenav to be fully customizable as it was before

#### What is the current behavior?
Having inserted a not-stylable container div between `mat-drawer` and the actual content, I cannot manage height and scrolling as before.

#### What is the use-case or motivation for changing an existing behavior?
For example, in my case I have a 'collapser' button inside sidenav (toggle between normal and drawer mini mode) which must stick to the top while allowing other options to scroll.

```html







...

```

This worked well without the intermediate div, because I could use `display: flex` to manage the height and scrolling making the `links-container` to take all available height minus that taken by the collapser element.

```scss
.mat-sidenav {
display: flex;
flex-direction: column;
}
```

Now I can't do it anymore and I'm forced to use global CSS to put the very same rules on the `mat-drawer-inner-container`, because I cannot style it from inside the component because of CSS scoping.

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

#### Is there anything else we should know?
The added element is documented here

https://github.com/angular/material2/blob/76044e8b5c3a6342b05d2e89dfb3b4ccf308c422/src/lib/sidenav/drawer.scss#L162-L167

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo le regole documentate di mat-drawer-inner-container in src/lib/sidenav/drawer.scss, quindi esamina in che modo il contenitore intermedio influisce sul layout di mat-sidenav e sugli stili con scope del componente. Il lavoro è completo quando sidenav può supportare il layout collapser-and-scroll descritto nell'issue senza richiedere CSS globale; non viene menzionato alcun file di test, quindi individua la coverage rilevante di sidenav prima di modificare il comportamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, scss, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.