@@ -36,43 +36,14 @@ $item-inset-divider-offset: 72px;
36
36
// based on whether the list is in dense mode.
37
37
@mixin item-base ($base-height , $height-with-avatar , $two-line-height ,
38
38
$three-line-height , $multi-line-padding , $icon-size , $avatar-size ) {
39
-
40
- // Prevents the wrapper `mat-list-item-content` from collapsing due to it
41
- // being `inline` by default.
42
- display : block ;
43
39
height : $base-height ;
44
- -webkit-tap-highlight-color : transparent ;
45
-
46
- // Override the user agent styling if the list item is a button.
47
- width : 100% ;
48
- padding : 0 ;
49
40
50
41
.mat-list-item-content {
51
- display : flex ;
52
- flex-direction : row ;
53
- align-items : center ;
54
- box-sizing : border-box ;
55
42
padding : 0 $side-padding ;
56
- position : relative ;
57
- height : inherit ;
58
43
}
59
44
60
45
.mat-list-item-content-reverse {
61
- display : flex ;
62
- align-items : center ;
63
46
padding : 0 $side-padding ;
64
- flex-direction : row-reverse ;
65
- justify-content : space-around ;
66
- }
67
-
68
- .mat-list-item-ripple {
69
- display : block ;
70
- @include layout-common .fill ;
71
-
72
- // Disable pointer events for the ripple container because the container will overlay the
73
- // user content and we don't want to disable mouse events on the user content.
74
- // Pointer events can be safely disabled because the ripple trigger element is the host element.
75
- pointer-events : none ;
76
47
}
77
48
78
49
& .mat-list-item-with-avatar {
@@ -83,7 +54,6 @@ $item-inset-divider-offset: 72px;
83
54
height : $two-line-height ;
84
55
}
85
56
86
-
87
57
& .mat-3-line {
88
58
height : $three-line-height ;
89
59
}
@@ -108,6 +78,23 @@ $item-inset-divider-offset: 72px;
108
78
padding : 0 ;
109
79
}
110
80
81
+ .mat-divider {
82
+ position : absolute ;
83
+ bottom : 0 ;
84
+ left : 0 ;
85
+ width : 100% ;
86
+ margin : 0 ;
87
+
88
+ [dir = ' rtl' ] & {
89
+ margin-left : auto ;
90
+ margin-right : 0 ;
91
+ }
92
+
93
+ & .mat-divider-inset {
94
+ position : absolute ; // necessary to override card styles
95
+ }
96
+ }
97
+
111
98
& .mat-list-item-with-avatar ,
112
99
& .mat-list-option {
113
100
.mat-list-item-content .mat-list-text {
@@ -171,23 +158,6 @@ $item-inset-divider-offset: 72px;
171
158
$side-padding );
172
159
}
173
160
}
174
-
175
- .mat-divider {
176
- position : absolute ;
177
- bottom : 0 ;
178
- left : 0 ;
179
- width : 100% ;
180
- margin : 0 ;
181
-
182
- [dir = ' rtl' ] & {
183
- margin-left : auto ;
184
- margin-right : 0 ;
185
- }
186
-
187
- & .mat-divider-inset {
188
- position : absolute ; // necessary to override card styles
189
- }
190
- }
191
161
}
192
162
193
163
.mat-subheader {
@@ -235,6 +205,45 @@ $item-inset-divider-offset: 72px;
235
205
}
236
206
}
237
207
208
+ .mat-list-item ,
209
+ .mat-list-option {
210
+ // Prevents the wrapper `mat-list-item-content` from collapsing due to it
211
+ // being `inline` by default.
212
+ display : block ;
213
+ -webkit-tap-highlight-color : transparent ;
214
+
215
+ // Button resets.
216
+ border : none ;
217
+ background : none ;
218
+ padding : 0 ;
219
+ width : 100% ;
220
+ }
221
+
222
+ .mat-list-item-ripple {
223
+ display : block ;
224
+ @include layout-common .fill ;
225
+
226
+ // Disable pointer events for the ripple container because the container will overlay the
227
+ // user content and we don't want to disable mouse events on the user content.
228
+ // Pointer events can be safely disabled because the ripple trigger element is the host element.
229
+ pointer-events : none ;
230
+ }
231
+
232
+ .mat-list-item-content {
233
+ display : flex ;
234
+ flex-direction : row ;
235
+ align-items : center ;
236
+ box-sizing : border-box ;
237
+ position : relative ;
238
+ height : inherit ;
239
+ }
240
+
241
+ .mat-list-item-content-reverse {
242
+ display : flex ;
243
+ align-items : center ;
244
+ flex-direction : row-reverse ;
245
+ justify-content : space-around ;
246
+ }
238
247
239
248
.mat-list-base [dense ] {
240
249
padding-top : $dense-top-padding ;
0 commit comments