@@ -42,16 +42,22 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
42
42
}
43
43
}
44
44
45
- :host {
45
+ md-sidenav-layout {
46
46
// We need a stacking context here so that the backdrop and drawers are clipped to the
47
47
// 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
49
49
// the application content does not get messed up with our own CSS.
50
50
@include md-stacking-context ();
51
51
52
52
box-sizing : border-box ;
53
53
-webkit-overflow-scrolling : touch ;
54
54
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
+
55
61
// TODO(hansl): Update this with a more robust solution.
56
62
& [fullscreen ] {
57
63
@include md-fullscreen ();
@@ -60,78 +66,69 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
60
66
overflow : hidden ;
61
67
}
62
68
}
69
+ }
63
70
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 ();
72
73
73
- display : block ;
74
+ display : block ;
74
75
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 ;
78
79
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 ;
84
85
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 ;
89
89
}
90
+ }
90
91
91
- & > md -content {
92
- @include md-stacking-context ();
92
+ .md-sidenav -content {
93
+ @include md-stacking-context ();
93
94
94
- display : block ;
95
- height : 100% ;
96
- overflow : auto ;
97
- }
95
+ display : block ;
96
+ height : 100% ;
97
+ overflow : auto ;
98
+ }
98
99
99
- > md-sidenav {
100
- @include md-stacking-context ();
100
+ md-sidenav {
101
+ @include md-stacking-context ();
101
102
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% ;
108
109
109
- // TODO(kara): revisit scrolling behavior for sidenavs
110
- overflow-y : auto ;
110
+ // TODO(kara): revisit scrolling behavior for sidenavs
111
+ overflow-y : auto ;
111
112
112
- background-color : $md-sidenav-background-color ;
113
+ background-color : $md-sidenav-background-color ;
113
114
114
- @include md-sidenav-transition (0 , -100% );
115
+ @include md-sidenav-transition (0 , -100% );
115
116
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
+ }
119
120
120
- & .md-sidenav-side {
121
- z-index : 1 ;
122
- }
121
+ & .md-sidenav-side {
122
+ z-index : 1 ;
123
+ }
123
124
124
- & .md-sidenav-end {
125
- right : 0 ;
125
+ & .md-sidenav-end {
126
+ right : 0 ;
126
127
127
- @include md-sidenav-transition (0 , 100% );
128
- }
128
+ @include md-sidenav-transition (0 , 100% );
129
129
}
130
- }
131
-
132
130
133
- :host-context([dir = ' rtl' ]) {
134
- > md-sidenav {
131
+ [dir = ' rtl' ] & {
135
132
@include md-sidenav-transition (0 , 100% );
136
133
137
134
& .md-sidenav-end {
0 commit comments