sphinx_rtd_theme icon indicating copy to clipboard operation
sphinx_rtd_theme copied to clipboard

Word wrap does not work well in grid tables

Open mhdirkse opened this issue 3 years ago • 2 comments

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

mhdirkse avatar Oct 11 '21 11:10 mhdirkse

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.

nienn avatar Oct 11 '21 15:10 nienn

Thanks, Mrs. Costa.

mhdirkse avatar Oct 12 '21 07:10 mhdirkse