Skip to content

Commit

Permalink
docs: fix HTML word wapping in table cells
Browse files Browse the repository at this point in the history
The sphinx_rtd_theme does not properly handle wrapping long lines in
table cells when rendering to HTML due to a CSS issue (see
readthedocs/sphinx_rtd_theme#1505).

Until the issue is fixed upstream in sphinx_rtd_theme, we can simply
override the CSS here.  This commit overrides the CSS in conf.py and
also touches up some places where we previously tried to work around
the lack of word wrapping.

Signed-off-by: Jeff Squyres <jeff@squyres.com>
  • Loading branch information
jsquyres committed Aug 21, 2023
1 parent bbae46f commit 9eb5f95
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 168 deletions.
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,16 @@
.. |flex_min_version| replace:: {flex_min_version}
"""

# The sphinx_rtd_theme does not properly handle wrapping long lines in
# table cells when rendering to HTML due to a CSS issue (see
# https://github.com/readthedocs/sphinx_rtd_theme/issues/1505). Until
# the issue is fixed upstream in sphinx_rtd_theme, we can simply
# override the CSS here.
rst_prolog += """
.. raw:: html
<style>
.wy-table-responsive table td,.wy-table-responsive table th{white-space:normal}
</style>
"""

0 comments on commit 9eb5f95

Please sign in to comment.