bug/feature(sidenav) limited customization caused by 'mat-drawer-inner-container' element
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par lire les règles documentées de mat-drawer-inner-container dans src/lib/sidenav/drawer.scss, puis examinez comment le conteneur intermédiaire affecte la mise en page de mat-sidenav et les styles propres aux composants. Le travail est terminé lorsque sidenav peut prendre en charge la mise en page collapser-and-scroll décrite dans l’issue sans nécessiter de CSS global ; aucun fichier de test n’est mentionné, identifiez donc la couverture pertinente de sidenav avant de modifier le comportement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, scss, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100