angular / angular/components

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

オープン
#13,983 コメント 18 件 リアクション 17 件 担当者 0 名 GitHub で見る
area: material/sidenav P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### 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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、src/lib/sidenav/drawer.scss にある文書化された mat-drawer-inner-container のルールを読み、次に中間コンテナが mat-sidenav のレイアウトとコンポーネントスコープのスタイルにどのような影響を与えるかを確認します。issue で説明されている collapser-and-scroll レイアウトを、グローバル CSS を必要とせずに sidenav がサポートできれば完了です。テストファイルへの言及はないため、動作を変更する前に関連する sidenav のカバレッジを特定してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, scss, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。