-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix table content wrapping #2202
Comments
I don't think it's possible to control column width in markdown unless you use HTML for tables or an extension (many of which seem to be JS). Here are a couple discussions I found:
I am not excited about using HTML for all of our tables or introducing HTML line breaks where the words are wrapping awkwardly either. I think the solution is going to be adjusting _table.css and using styles to control this. Other potential resources: |
For anyone facing this issue, just use  -s (non breaking space) to extend the header of the column you want to make wider. You can copy it from here: " ". Make sure to add equal amount before and after the header text so it will stay centered.
|
Thank you @maor-rosenfeld |
Description
Longer table headers break at the first column even when the other columns do not contain any header content.
Table columns do not expand to fit the longest content. Table columns with short content take up the same space as columns with more content.
I don't think we can fix this with markdown, but I want to investigate options and see what we can do.
Category
This is an issue with:
Affected pages
All docs pages with tables with a single header (like https://docs.sensu.io/sensu-go/latest/api/checks/#checkscheckhookshook-delete-specification)
All docs pages with content that wraps in table rows (like https://docs.sensu.io/sensu-go/latest/reference/filters/#event-attributes-available-to-filters)
Expected behavior
Long headings extend across the full width of the table when only a single column has heading content OR break at logical points rather than randomly
Table columns expand to fit the longest content they contain.
Current behavior
Longer content breaks randomly (including in the middle of words) even when no other columns contain content or have too much whitespace. It is unsightly.
Changes needed
Hillary to investigate and come up with a good idea for fixing or mitigating this.
The text was updated successfully, but these errors were encountered: