-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material-experimental/mdc-table): add background color; disable hover styles; fix sticky columns #22723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…over styles; fix sticky columns
// (already set in MDC), and cell. | ||
.mat-mdc-table tbody, .mat-mdc-table tfoot, | ||
.mat-mdc-cell, .mat-mdc-footer-cell { | ||
background: inherit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having these inherit the background, would it make sense to just assign the background to the cells in the theme? This feels like something that we could forget about if we remove the background from the theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean assign the card background to the cells? The benefit with the inherit
approach is that users can style the table host element with a background and it works as expected, rather than identifying that they need to style the cell background.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, makes sense. Let's keep it like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The MDC-based table does not handle sticky columns. Cells overlap their text since they do not have a background color. Fixed by adding a background color to the table like we do with the legacy table, and inheriting the background down through the component.
Hover styles have been disabled. They break this fix since they include opacity, introducing the same issue. MDC should change their default hover color to be a solid color rather than one with an alpha channel.