File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
src/material-experimental/mdc-table Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ @use ' sass:map' ;
12@use ' @material/theme/theme-color' as mdc-theme-color ;
23@use ' @material/data-table/data-table' as mdc-data-table ;
34@use ' @material/data-table/data-table-theme' as mdc-data-table-theme ;
4142 mdc-data-table-theme .$sort-icon-color : $orig-sort-icon-color ;
4243 mdc-data-table-theme .$sort-icon-active-color : $orig-sort-icon-active-color ;
4344 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+ }
4450}
4551
4652@mixin typography ($config-or-theme ) {
Original file line number Diff line number Diff line change 1717// change since the table did not previously apply it.
1818// TODO: Add a mixin to MDC to set the layout instead of including this override,
1919// see this issue: https://github.com/material-components/material-components-web/issues/6412
20- .mdc-data-table__table {
20+ .mat- mdc-table {
2121 table-layout : auto ;
2222}
2323
2727mat-row .mat-mdc-row , mat-header-row .mat-mdc-header-row , mat-footer-row .mat-mdc-footer-row {
2828 border-bottom : none ;
2929}
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