Skip to content
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

style(DataTable): fix sortable table header padding #7726

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

tw15egan
Copy link
Member

@tw15egan tw15egan commented Feb 2, 2021

Closes #7724

Scopes the padding to the proper element when using the sortable version of DataTable

Changelog

Changed

  • Removed padding from the th and applied it to the button that receives hover styles

Testing / Reviewing

Ensure hover styles are correct on the Sortable version of DataTable, and that no other variants have changed

@netlify
Copy link

netlify bot commented Feb 2, 2021

Deploy preview for carbon-elements ready!

Built with commit 0ec1f66

https://deploy-preview-7726--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Feb 2, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 0ec1f66

https://deploy-preview-7726--carbon-components-react.netlify.app

Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was fast!

@kodiakhq kodiakhq bot merged commit f6ecfbf into carbon-design-system:master Feb 9, 2021
@dabrad26
Copy link
Member

dabrad26 commented Feb 24, 2021

If using a table that has a mix of sortable headers and not sortable headers this causes the non-sortable headers to have no padding.

I assume you would need to do something like as well to compensate for that use case?

.#{$prefix}--data-table.#{$prefix}--data-table--sort th > .#{$prefix}--table-header-label {
    padding-right: $spacing-05;
    padding-left: $spacing-05;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data table] style regression: sort hover is rendering incorrectly
5 participants