@@ -102,53 +102,34 @@ $mat-list-item-inset-divider-offset: 72px;
102102 padding : 0 ;
103103 }
104104
105- // There can be a secondary item (e.g. avatar-icon, checkbox) at the start of the
106- // list-item. This means that there should be a padding for the mat-list-text on the start-side.
107- .mat-list-item-content .mat-list-text :not (:nth-child (2 )) {
108- padding-right : 0 ;
109- padding-left : $mat-list-side-padding ;
110-
111- [dir = ' rtl' ] & {
112- padding-right : $mat-list-side-padding ;
113- padding-left : 0 ;
114- }
115- }
116-
117- // Reversed content is mainly used by the MatSelectionList for displaying the checkbox at the
118- // end of the list option. Since there is a secondary item (checkbox) at the end of the
119- // option, there needs to be a padding for the mat-list-text on the end-side.
120- .mat-list-item-content-reverse .mat-list-text :not (:nth-child (2 )) {
121- padding-left : 0 ;
122- padding-right : $mat-list-side-padding ;
123-
124- [dir = ' rtl' ] & {
105+ & .mat-list-item-with-avatar ,
106+ & .mat-list-option {
107+ .mat-list-item-content .mat-list-text {
125108 padding-right : 0 ;
126109 padding-left : $mat-list-side-padding ;
110+
111+ [dir = ' rtl' ] & {
112+ padding-right : $mat-list-side-padding ;
113+ padding-left : 0 ;
114+ }
127115 }
128- }
129116
130- // If avatar is the 4th item, it means the list-item has both checkbox and avatar-icon.
131- // This means that there should be a margin for the mat-list-avatar on the start-side.
132- .mat-list-item-content .mat-list-avatar :nth-child (4 ) {
133- margin-right : 0 ;
134- margin-left : $mat-list-side-padding ;
117+ .mat-list-item-content-reverse .mat-list-text {
118+ padding-left : 0 ;
119+ padding-right : $mat-list-side-padding ;
135120
136- [dir = ' rtl' ] & {
137- margin-right : $mat-list-side-padding ;
138- margin-left : 0 ;
121+ [dir = ' rtl' ] & {
122+ padding-right : 0 ;
123+ padding-left : $mat-list-side-padding ;
124+ }
139125 }
140- }
126+ }
141127
142- // Reversed content is mainly used by the MatSelectionList for displaying the checkbox at the
143- // end of the list option. If avatar is the 4th item, it means the list-item has both checkbox
144- // and avatar-icon. There needs to be a padding for the mat-list-avatar on the end-side.
145- .mat-list-item-content-reverse .mat-list-avatar :nth-child (4 ) {
146- margin-left : 0 ;
147- margin-right : $mat-list-side-padding ;
148-
149- [dir = ' rtl' ] & {
150- margin-right : 0 ;
151- margin-left : $mat-list-side-padding ;
128+ & .mat-list-item-with-avatar.mat-list-option {
129+ .mat-list-item-content-reverse .mat-list-text ,
130+ .mat-list-item-content .mat-list-text {
131+ padding-right : $mat-list-side-padding ;
132+ padding-left : $mat-list-side-padding ;
152133 }
153134 }
154135
0 commit comments