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

Fit column width to child elements #1753

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

tmpacifitech
Copy link
Contributor

Copy link
Contributor

@akksi akksi left a comment

Choose a reason for hiding this comment

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

I think it's a nice approach to use flex instead of float here, the current solution has some alignment issues yet, a possible way to solve it:

  1. Using flex instead of inline-flex as we should fill in the width of the column
  2. adding justtify: space-between to keep the sorting icon aligned to the left and text to the right
  3. removing float: left from the wrapper that prevents it from taking the width of the column
    (4. it would be nice to remove float: left from the children too, as it becomes pointless with this solution)

Current alignment: image
Expected alignment:
image

@jackparmer
Copy link
Contributor

@akksi @tmpacifitech is this one good to go?

@tmpacifitech
Copy link
Contributor Author

@jackparmer Yes

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

Successfully merging this pull request may close these issues.

Datatable cutting off last letter of columns headers
3 participants