From 32b9b4bb767a4166fc27f3b51d474280243bb61a Mon Sep 17 00:00:00 2001 From: Claudius Heine Date: Wed, 28 Jun 2017 14:48:47 +0200 Subject: [PATCH] Fixed wrapping of cell content in readthedocs style The readthedocs style for sphinx has an issue where it does not auto wrap text in table cells. This results in very long cells with a vertical scrollbar. This adds a css style sheet to fix this wrapping issue. Signed-off-by: Claudius Heine --- docs/_static/theme_overrides.css | 13 +++++++++++++ docs/conf.py | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 docs/_static/theme_overrides.css diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css new file mode 100644 index 0000000..63ee6cc --- /dev/null +++ b/docs/_static/theme_overrides.css @@ -0,0 +1,13 @@ +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } +} diff --git a/docs/conf.py b/docs/conf.py index e062aa0..98bf200 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -251,6 +251,12 @@ html_static_path = ['_static'] # Output file base name for HTML help builder. htmlhelp_basename = 'kasdoc' +html_context = { + 'extra_css_files': [ + '_static/theme_overrides.css', # override wide tables in RTD theme + ], +} + # -- Options for LaTeX output --------------------------------------------- latex_elements = {