@@ -3,54 +3,41 @@ $header-row-height: 56px;
33$row-height : 48px ;
44$row-horizontal-padding : 24px ;
55
6- @mixin private-table-flex-styles ($prefix ) {
7- // These styles are nested under a `:not(table)`, because
8- // they can break the non-flex table if they leak out.
9- .#{$prefix } -table :not (table ) {
6+ // Only use tag name selectors here since the styles are shared between MDC and non-MDC
7+ @mixin private-table-flex-styles {
8+ mat-table {
109 display : block ;
11-
12- .#{$prefix } -cell , .#{$prefix } -header-cell , .#{$prefix } -footer-cell {
13- display : flex ;
14- }
15-
16- .#{$prefix } -row , .#{$prefix } -header-row , .#{$prefix } -footer-row {
17- display : flex ;
18-
19- // Workaround for https://goo.gl/pFmjJD in IE 11. Adds a pseudo
20- // element that will stretch the row the correct height. See:
21- // https://connect.microsoft.com/IE/feedback/details/802625
22- & ::after {
23- display : inline-block ;
24- min-height : inherit ;
25- content : ' ' ;
26- }
27- }
2810 }
2911
30- // The remaining styles can leak to the native table without affecting it.
31- // We keep them outside to lower the specificity.
32- .#{$prefix } -header-row {
12+ mat-header-row {
3313 min-height : $header-row-height ;
3414 }
3515
36- . #{ $prefix } -row , . #{ $prefix } -footer-row {
16+ mat -row , mat -footer-row {
3717 min-height : $row-height ;
3818 }
3919
40- .#{$prefix } -row , .#{$prefix } -header-row , .#{$prefix } -footer-row {
20+ mat-row , mat-header-row , mat-footer-row {
21+ display : flex ;
22+ // Define a border style, but then widths default to 3px. Reset them to 0px except the bottom
23+ // which should be 1px;
24+ border-width : 0 ;
4125 border-bottom-width : 1px ;
42- border-bottom- style : solid ;
26+ border-style : solid ;
4327 align-items : center ;
4428 box-sizing : border-box ;
45- }
4629
47- .#{$prefix } -cell , .#{$prefix } -header-cell , .#{$prefix } -footer-cell {
48- flex : 1 ;
49- overflow : hidden ;
50- word-wrap : break-word ;
51- min-height : inherit ;
52- align-items : center ;
30+ // Workaround for https://goo.gl/pFmjJD in IE 11. Adds a pseudo
31+ // element that will stretch the row the correct height. See:
32+ // https://connect.microsoft.com/IE/feedback/details/802625
33+ & ::after {
34+ display : inline-block ;
35+ min-height : inherit ;
36+ content : ' ' ;
37+ }
38+ }
5339
40+ mat-cell , mat-header-cell , mat-footer-cell {
5441 // Note: we use `first-of-type`/`last-of-type` here in order to prevent extra
5542 // elements like ripples or badges from throwing off the layout (see #11165).
5643 & :first-of-type {
@@ -71,4 +58,13 @@ $row-horizontal-padding: 24px;
7158 }
7259 }
7360 }
61+
62+ mat-cell , mat-header-cell , mat-footer-cell {
63+ flex : 1 ;
64+ display : flex ;
65+ align-items : center ;
66+ overflow : hidden ;
67+ word-wrap : break-word ;
68+ min-height : inherit ;
69+ }
7470}
0 commit comments