@@ -42,16 +42,22 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
4242 }
4343}
4444
45- :host {
45+ md-sidenav-layout {
4646 // We need a stacking context here so that the backdrop and drawers are clipped to the
4747 // MdSidenavLayout. This creates a new z-index stack so we use low numbered z-indices.
48- // We create another stacking context in the '< md-content> ' and in each sidenav so that
48+ // We create another stacking context in the '. md-sidenav- content' and in each sidenav so that
4949 // the application content does not get messed up with our own CSS.
5050 @include md-stacking-context ();
5151
5252 box-sizing : border-box ;
5353 -webkit-overflow-scrolling : touch ;
5454
55+ // Need this to take up space in the layout.
56+ display : block ;
57+
58+ // Hide the sidenavs when they're closed.
59+ overflow : hidden ;
60+
5561 // TODO(hansl): Update this with a more robust solution.
5662 & [fullscreen ] {
5763 @include md-fullscreen ();
@@ -60,78 +66,69 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
6066 overflow : hidden ;
6167 }
6268 }
69+ }
6370
64- // Need this to take up space in the layout.
65- display : block ;
66-
67- // Hide the sidenavs when they're closed.
68- overflow : hidden ;
69-
70- & > .md-sidenav-backdrop {
71- @include md-fullscreen ();
71+ .md-sidenav-backdrop {
72+ @include md-fullscreen ();
7273
73- display : block ;
74+ display : block ;
7475
75- // Because of the new stacking context, the z-index stack is new and we can use our own
76- // numbers.
77- z-index : 2 ;
76+ // Because of the new stacking context, the z-index stack is new and we can use our own
77+ // numbers.
78+ z-index : 2 ;
7879
79- // We use 'visibility: hidden | visible' because 'display: none' will not animate any
80- // transitions, while visibility will interpolate transitions properly.
81- // see https://developer.mozilla.org/en-US/docs/Web/CSS/visibility, the Interpolation
82- // section.
83- visibility : hidden ;
80+ // We use 'visibility: hidden | visible' because 'display: none' will not animate any
81+ // transitions, while visibility will interpolate transitions properly.
82+ // see https://developer.mozilla.org/en-US/docs/Web/CSS/visibility, the Interpolation
83+ // section.
84+ visibility : hidden ;
8485
85- & .md-sidenav-shown {
86- visibility : visible ;
87- background-color : $md-sidenav-backdrop-color ;
88- }
86+ & .md-sidenav-shown {
87+ visibility : visible ;
88+ background-color : $md-sidenav-backdrop-color ;
8989 }
90+ }
9091
91- & > md -content {
92- @include md-stacking-context ();
92+ .md-sidenav -content {
93+ @include md-stacking-context ();
9394
94- display : block ;
95- height : 100% ;
96- overflow : auto ;
97- }
95+ display : block ;
96+ height : 100% ;
97+ overflow : auto ;
98+ }
9899
99- > md-sidenav {
100- @include md-stacking-context ();
100+ md-sidenav {
101+ @include md-stacking-context ();
101102
102- display : block ;
103- position : absolute ;
104- top : 0 ;
105- bottom : 0 ;
106- z-index : 3 ;
107- min-width : 5% ;
103+ display : block ;
104+ position : absolute ;
105+ top : 0 ;
106+ bottom : 0 ;
107+ z-index : 3 ;
108+ min-width : 5% ;
108109
109- // TODO(kara): revisit scrolling behavior for sidenavs
110- overflow-y : auto ;
110+ // TODO(kara): revisit scrolling behavior for sidenavs
111+ overflow-y : auto ;
111112
112- background-color : $md-sidenav-background-color ;
113+ background-color : $md-sidenav-background-color ;
113114
114- @include md-sidenav-transition (0 , -100% );
115+ @include md-sidenav-transition (0 , -100% );
115116
116- & .md-sidenav-push {
117- background-color : $md-sidenav-push-background-color ;
118- }
117+ & .md-sidenav-push {
118+ background-color : $md-sidenav-push-background-color ;
119+ }
119120
120- & .md-sidenav-side {
121- z-index : 1 ;
122- }
121+ & .md-sidenav-side {
122+ z-index : 1 ;
123+ }
123124
124- & .md-sidenav-end {
125- right : 0 ;
125+ & .md-sidenav-end {
126+ right : 0 ;
126127
127- @include md-sidenav-transition (0 , 100% );
128- }
128+ @include md-sidenav-transition (0 , 100% );
129129 }
130- }
131-
132130
133- :host-context([dir = ' rtl' ]) {
134- > md-sidenav {
131+ [dir = ' rtl' ] & {
135132 @include md-sidenav-transition (0 , 100% );
136133
137134 & .md-sidenav-end {
0 commit comments