File tree 2 files changed +22
-1
lines changed
src/material-experimental/mdc-table
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change
1
+ @use ' sass:map' ;
1
2
@use ' @material/theme/theme-color' as mdc-theme-color ;
2
3
@use ' @material/data-table/data-table' as mdc-data-table ;
3
4
@use ' @material/data-table/data-table-theme' as mdc-data-table-theme ;
41
42
mdc-data-table-theme .$sort-icon-color : $orig-sort-icon-color ;
42
43
mdc-data-table-theme .$sort-icon-active-color : $orig-sort-icon-active-color ;
43
44
mdc-data-table-theme .$stroke-color : $orig-stroke-color ;
45
+
46
+ .mat-mdc-table {
47
+ $background : map .get ($config , background );
48
+ background : theming .get-color-from-palette ($background , ' card' );
49
+ }
44
50
}
45
51
46
52
@mixin typography ($config-or-theme ) {
Original file line number Diff line number Diff line change 17
17
// change since the table did not previously apply it.
18
18
// TODO: Add a mixin to MDC to set the layout instead of including this override,
19
19
// see this issue: https://github.com/material-components/material-components-web/issues/6412
20
- .mdc-data-table__table {
20
+ .mat- mdc-table {
21
21
table-layout : auto ;
22
22
}
23
23
27
27
mat-row .mat-mdc-row , mat-header-row .mat-mdc-header-row , mat-footer-row .mat-mdc-footer-row {
28
28
border-bottom : none ;
29
29
}
30
+
31
+ // Cells need to inherit their background in order to overlap each other when sticky.
32
+ // The background needs to be inherited from the table, tbody/tfoot, row
33
+ // (already set in MDC), and cell.
34
+ .mat-mdc-table tbody , .mat-mdc-table tfoot ,
35
+ .mat-mdc-cell , .mat-mdc-footer-cell {
36
+ background : inherit ;
37
+ }
38
+
39
+ // Disable hover styling while MDC uses an opacity for its color.
40
+ // When the hover style is used with sticky cells, the opacity shows the cells overlapping.
41
+ .mat-mdc-table .mat-mdc-row :hover ,
42
+ .mat-mdc-table .mat-mdc-footer-row :hover {
43
+ background-color : inherit ;
44
+ }
You can’t perform that action at this time.
0 commit comments