File tree Expand file tree Collapse file tree 1 file changed +9
-38
lines changed Expand file tree Collapse file tree 1 file changed +9
-38
lines changed Original file line number Diff line number Diff line change @@ -6,48 +6,10 @@ $mat-chip-line-height: 16px;
66$mat-chips-chip-margin : $mat-chip-horizontal-padding / 4 ;
77
88.mat-chip-list-wrapper {
9-
109 display : flex ;
1110 flex-direction : row ;
1211 flex-wrap : wrap ;
1312 align-items : flex-start ;
14-
15- /*
16- * Only apply the margins to chips
17- */
18- .mat-chip :not (.mat-basic-chip ) {
19- margin : 0 $mat-chips-chip-margin 0 $mat-chips-chip-margin ;
20-
21- // Remove the margin from the first element (in both LTR and RTL)
22- & :first-child {
23- margin : {
24- left : 0 ;
25- right : $mat-chips-chip-margin ;
26- }
27-
28- [dir = ' rtl' ] & {
29- margin : {
30- left : $mat-chips-chip-margin ;
31- right : 0 ;
32- }
33- }
34- }
35-
36- // Remove the margin from the last element (in both LTR and RTL)
37- & :last-child {
38- margin : {
39- left : $mat-chips-chip-margin ;
40- right : 0 ;
41- }
42-
43- [dir = ' rtl' ] & {
44- margin : {
45- left : 0 ;
46- right : $mat-chips-chip-margin ;
47- }
48- }
49- }
50- }
5113}
5214
5315.mat-chip :not (.mat-basic-chip ) {
@@ -57,6 +19,15 @@ $mat-chips-chip-margin: $mat-chip-horizontal-padding / 4;
5719
5820 font-size : $mat-chip-font-size ;
5921 line-height : $mat-chip-line-height ;
22+
23+ // Apply a margin to adjacent sibling chips.
24+ & + & {
25+ margin : 0 0 0 $mat-chips-chip-margin ;
26+
27+ [dir = ' rtl' ] & {
28+ margin : 0 $mat-chips-chip-margin 0 0 ;
29+ }
30+ }
6031}
6132
6233.mat-chip-list-stacked .mat-chip-list-wrapper {
You can’t perform that action at this time.
0 commit comments