@@ -39,23 +39,25 @@ mat-row, mat-header-row, mat-footer-row {
39
39
}
40
40
}
41
41
42
- // Note: we use `first-of-type`/`last-of-type` here in order to prevent extra
43
- // elements like ripples or badges from throwing off the layout (see #11165).
44
- mat-cell :first-of-type , mat-header-cell :first-of-type , mat-footer-cell :first-of-type {
45
- padding-left : $mat-row-horizontal-padding ;
42
+ mat-cell , mat-header-cell , mat-footer-cell {
43
+ // Note: we use `first-of-type`/`last-of-type` here in order to prevent extra
44
+ // elements like ripples or badges from throwing off the layout (see #11165).
45
+ & :first-of-type {
46
+ padding-left : $mat-row-horizontal-padding ;
46
47
47
- [dir = ' rtl' ] & {
48
- padding-left : 0 ;
49
- padding-right : $mat-row-horizontal-padding ;
48
+ [dir = ' rtl' ] & :not (:only-of-type ) {
49
+ padding-left : 0 ;
50
+ padding-right : $mat-row-horizontal-padding ;
51
+ }
50
52
}
51
- }
52
53
53
- mat-cell :last-of-type , mat-header-cell :last-of-type , mat-footer-cell :last-of-type {
54
- padding-right : $mat-row-horizontal-padding ;
54
+ & :last-of-type {
55
+ padding-right : $mat-row-horizontal-padding ;
55
56
56
- [dir = ' rtl' ] & {
57
- padding-right : 0 ;
58
- padding-left : $mat-row-horizontal-padding ;
57
+ [dir = ' rtl' ] & :not (:only-of-type ) {
58
+ padding-right : 0 ;
59
+ padding-left : $mat-row-horizontal-padding ;
60
+ }
59
61
}
60
62
}
61
63
@@ -95,25 +97,25 @@ th.mat-header-cell, td.mat-cell, td.mat-footer-cell {
95
97
padding : 0 ;
96
98
border-bottom-width : 1px ;
97
99
border-bottom-style : solid ;
98
- }
99
100
100
- // Note: we use `first-of-type`/`last-of-type` here in order to prevent extra
101
- // elements like ripples or badges from throwing off the layout (see #11165).
102
- th .mat-header-cell :first-of-type , td .mat-cell :first-of-type , td .mat-footer-cell :first-of-type {
103
- padding-left : $mat-row-horizontal-padding ;
101
+ // Note: we use `first-of-type`/`last-of-type` here in order to prevent extra
102
+ // elements like ripples or badges from throwing off the layout (see #11165).
103
+ & :first-of-type {
104
+ padding-left : $mat-row-horizontal-padding ;
104
105
105
- [dir = ' rtl' ] & {
106
- padding-left : 0 ;
107
- padding-right : $mat-row-horizontal-padding ;
106
+ [dir = ' rtl' ] & :not (:only-of-type ) {
107
+ padding-left : 0 ;
108
+ padding-right : $mat-row-horizontal-padding ;
109
+ }
108
110
}
109
- }
110
111
111
- th .mat-header-cell :last-of-type , td .mat-cell :last-of-type , td .mat-footer-cell :last-of-type {
112
- padding-right : $mat-row-horizontal-padding ;
112
+ & :last-of-type {
113
+ padding-right : $mat-row-horizontal-padding ;
113
114
114
- [dir = ' rtl' ] & {
115
- padding-right : 0 ;
116
- padding-left : $mat-row-horizontal-padding ;
115
+ [dir = ' rtl' ] & :not (:only-of-type ) {
116
+ padding-right : 0 ;
117
+ padding-left : $mat-row-horizontal-padding ;
118
+ }
117
119
}
118
120
}
119
121
0 commit comments