-
Notifications
You must be signed in to change notification settings - Fork 780
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
Add ability to remove cell padding #3435
Comments
I assume you mean the cell padding that's baked in #2503 (comment). Textual CSS works at the widget level, but datatable cells aren't widgets internally. Your CSS above is targetting the margin/padding of the table widget itself, not the cells. |
@rmurray2 There's no way to remove the cell padding at the moment. Without cell padding the cells would be right next to each other, and it would be difficult to read. Perhaps you could explain why you want this? We might be able to offer alternative suggestions. |
@willmcgugan thanks for your reply. I'd ultimately like to generate a heatmap, like the image below, in which the backgrounds correspond to an intensity value for that row/column combination |
That's a novel use for the datatable! I doubt it will be difficult for use to add an option to remove cell padding. We will look in to it for the next version. |
Great, thanks, just one suggestion: The column header row will become difficult to read if the padding is removed, so I would suggest, if it's possible, tilting the right side of the labels at about a 45 or more degree angle. Or any arbitrary, user-defined angle. That way they won't run into each other. |
I may not have followed what you are suggesting there, but its impossible to rotate text in the terminal I'm afraid. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
I haven't been able to modify the style of a DataTable so that there is zero space between the columns. This in contrast to the rows, which are stacked with zero space between the cells.
I've tried setting
margin
,grid-gutter
andpadding
to zero in the TCSS file, with no success:The text was updated successfully, but these errors were encountered: