|
7 | 7 | // Mixin that creates a new stacking context. |
8 | 8 | // see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context |
9 | 9 | // stylelint-enable |
10 | | -@mixin mat-sidenav-stacking-context() { |
| 10 | +@mixin mat-drawer-stacking-context() { |
11 | 11 | position: relative; |
12 | 12 |
|
13 | 13 | // Use a transform to create a new stacking context. |
14 | 14 | transform: translate3d(0, 0, 0); |
15 | 15 | } |
16 | 16 |
|
17 | | -.mat-sidenav-container { |
| 17 | +.mat-drawer-container { |
18 | 18 | // We need a stacking context here so that the backdrop and drawers are clipped to the |
19 | | - // MdSidenavContainer. This creates a new z-index stack so we use low numbered z-indices. |
20 | | - // We create another stacking context in the '.mat-sidenav-content' and in each sidenav so that |
| 19 | + // MdDrawerContainer. This creates a new z-index stack so we use low numbered z-indices. |
| 20 | + // We create another stacking context in the '.mat-drawer-content' and in each drawer so that |
21 | 21 | // the application content does not get messed up with our own CSS. |
22 | | - @include mat-sidenav-stacking-context(); |
| 22 | + @include mat-drawer-stacking-context(); |
23 | 23 |
|
24 | 24 | box-sizing: border-box; |
25 | 25 | -webkit-overflow-scrolling: touch; |
26 | 26 |
|
27 | 27 | // Need this to take up space in the layout. |
28 | 28 | display: block; |
29 | 29 |
|
30 | | - // Hide the sidenavs when they're closed. |
| 30 | + // Hide the drawers when they're closed. |
31 | 31 | overflow: hidden; |
32 | 32 |
|
33 | 33 | // TODO(hansl): Update this with a more robust solution. |
34 | 34 | &[fullscreen] { |
35 | 35 | @include mat-fill(); |
36 | 36 |
|
37 | | - &.mat-sidenav-opened { |
| 37 | + &.mat-drawer-opened { |
38 | 38 | overflow: hidden; |
39 | 39 | } |
40 | 40 | } |
41 | 41 | } |
42 | 42 |
|
43 | | -.mat-sidenav-backdrop { |
| 43 | +.mat-drawer-backdrop { |
44 | 44 | @include mat-fill(); |
45 | 45 |
|
46 | 46 | display: block; |
|
55 | 55 | // section. |
56 | 56 | visibility: hidden; |
57 | 57 |
|
58 | | - &.mat-sidenav-shown { |
| 58 | + &.mat-drawer-shown { |
59 | 59 | visibility: visible; |
60 | 60 | } |
61 | 61 |
|
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |
|
67 | | -.mat-sidenav-content { |
68 | | - @include mat-sidenav-stacking-context(); |
| 67 | +.mat-drawer-content { |
| 68 | + @include mat-drawer-stacking-context(); |
69 | 69 |
|
70 | 70 | display: block; |
71 | 71 | height: 100%; |
72 | 72 | overflow: auto; |
73 | 73 | } |
74 | 74 |
|
75 | | -.mat-sidenav { |
76 | | - @include mat-sidenav-stacking-context(); |
| 75 | +.mat-drawer { |
| 76 | + @include mat-drawer-stacking-context(); |
77 | 77 |
|
78 | 78 | display: block; |
79 | 79 | position: absolute; |
|
84 | 84 | outline: 0; |
85 | 85 | box-sizing: border-box; |
86 | 86 | height: 100%; |
87 | | - overflow-y: auto; // TODO(kara): revisit scrolling behavior for sidenavs |
| 87 | + overflow-y: auto; // TODO(kara): revisit scrolling behavior for drawers |
88 | 88 | transform: translate3d(-100%, 0, 0); |
89 | 89 |
|
90 | | - &.mat-sidenav-side { |
| 90 | + &.mat-drawer-side { |
91 | 91 | z-index: 1; |
92 | 92 | } |
93 | 93 |
|
94 | | - &.mat-sidenav-end { |
| 94 | + &.mat-drawer-end { |
95 | 95 | right: 0; |
96 | 96 | transform: translate3d(100%, 0, 0); |
97 | 97 | } |
98 | 98 |
|
99 | 99 | [dir='rtl'] & { |
100 | 100 | transform: translate3d(100%, 0, 0); |
101 | 101 |
|
102 | | - &.mat-sidenav-end { |
| 102 | + &.mat-drawer-end { |
103 | 103 | left: 0; |
104 | 104 | right: auto; |
105 | 105 | transform: translate3d(-100%, 0, 0); |
106 | 106 | } |
107 | 107 | } |
108 | 108 |
|
109 | | - &.mat-sidenav-opening, &.mat-sidenav-opened { |
110 | | - &:not(.mat-sidenav-side) { |
| 109 | + &.mat-drawer-opening, &.mat-drawer-opened { |
| 110 | + &:not(.mat-drawer-side) { |
111 | 111 | // The elevation of z-16 is noted in the design specifications. |
112 | 112 | // See https://material.io/guidelines/patterns/navigation-drawer.html# |
113 | 113 | @include mat-elevation(16); |
|
0 commit comments