From 435baf95d3d19cb8641ff2ebb41253c659fe677c Mon Sep 17 00:00:00 2001 From: ZyX Date: Fri, 9 Jan 2015 16:52:01 +0300 Subject: [PATCH] Allow wrapping of RTD tables --- docs/source/_static/css/theme_overrides.css | 6 ++++++ docs/source/conf.py | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 docs/source/_static/css/theme_overrides.css diff --git a/docs/source/_static/css/theme_overrides.css b/docs/source/_static/css/theme_overrides.css new file mode 100644 index 00000000..7e39e343 --- /dev/null +++ b/docs/source/_static/css/theme_overrides.css @@ -0,0 +1,6 @@ +.wy-table-responsive > table > tbody > tr > td { + white-space: unset; +} +.wy-table-responsive > table > tbody > tr > td:first-child { + vertical-align: top; +} diff --git a/docs/source/conf.py b/docs/source/conf.py index 99101df1..5577ef65 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,3 +59,12 @@ if not on_rtd: # only import and set the theme if we’re building docs locally html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] except ImportError: pass + +if on_rtd or html_theme == 'sphinx_rtd_theme': + html_context = { + 'css_files': [ + 'https://media.readthedocs.org/css/sphinx_rtd_theme.css', + 'https://media.readthedocs.org/css/readthedocs-doc-embed.css', + '_static/css/theme_overrides.css', + ], + }