sphinx_rtd_theme
sphinx_rtd_theme copied to clipboard
Word wrap does not work well in grid tables
Problem
I had a grid table with two columns. The table became too wide because word wrap did not work properly. See question on StackOverflow. I got an answer that suggested a custom style sheet:
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: inherit;
}
This fixed my issue. I would like this behavior without having to add a custom style sheet.
Reproducible Project
See https://frank-manual.readthedocs.io/en/credentials/deploying/credentials.html and https://github.com/ibissource/frank-manual/tree/credentials. This code does what I want, but only because I have a custom style sheet custom.css
. I would like to be able to remove that file.
Error Logs/Results
Place any images or error logs that might be able to help solve the issue here.
Expected Results
Please describe how this should work properly.
Environment Info
- Python Version: Python 3.8.2
- Sphinx Version: 4.0.0
- RTD Theme Version: 0.5.2
Hi @mhdirkse, unfortunately, this is not a feature that we can implement by default.
Modern tables are used to display all kinds of data and this makes it exceedingly difficult to find a rule that will fit all purposes. The table primarily purpose, however, is to display tabular data, often technical data, that generally benefits from not being wrapped randomly. We must keep this in mind when defining the default tables' behaviour in a way that best fits the majority of uses.
On a future major version of the theme we will try to offer more options for tables display with minimal setup. For now, the custom.css
is still the best option.
Thanks, Mrs. Costa.