@@ -3,54 +3,41 @@ $header-row-height: 56px;
3
3
$row-height : 48px ;
4
4
$row-horizontal-padding : 24px ;
5
5
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 {
10
9
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
- }
28
10
}
29
11
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 {
33
13
min-height : $header-row-height ;
34
14
}
35
15
36
- . #{ $prefix } -row , . #{ $prefix } -footer-row {
16
+ mat -row , mat -footer-row {
37
17
min-height : $row-height ;
38
18
}
39
19
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 ;
41
25
border-bottom-width : 1px ;
42
- border-bottom- style : solid ;
26
+ border-style : solid ;
43
27
align-items : center ;
44
28
box-sizing : border-box ;
45
- }
46
29
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
+ }
53
39
40
+ mat-cell , mat-header-cell , mat-footer-cell {
54
41
// Note: we use `first-of-type`/`last-of-type` here in order to prevent extra
55
42
// elements like ripples or badges from throwing off the layout (see #11165).
56
43
& :first-of-type {
@@ -71,4 +58,13 @@ $row-horizontal-padding: 24px;
71
58
}
72
59
}
73
60
}
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
+ }
74
70
}
0 commit comments