From 87be3a4fd35a2cdbceb66abdcbe53cc9c602cfc9 Mon Sep 17 00:00:00 2001 From: stevenjackson121 Date: Sat, 5 Oct 2019 11:09:38 -0400 Subject: [PATCH 1/2] fix `sphinx_rtd_theme` lines in tables wrapping * `sphinx_rtd_theme` known issue: long lines in tables do not wrap by default - readthedocs/sphinx_rtd_theme#117 --- docs/source/_static/hackrtd.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/source/_static/hackrtd.css b/docs/source/_static/hackrtd.css index e75a889f69..47f8a0ec41 100644 --- a/docs/source/_static/hackrtd.css +++ b/docs/source/_static/hackrtd.css @@ -110,3 +110,17 @@ a.trio-help-hint, .trio-help-hint a:link, .trio-help-hint a:visited { text-decoration: none; border-bottom: 1px solid; } + +/* 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; + } +} From 739c627431975d282ff258416b677574dafa476c Mon Sep 17 00:00:00 2001 From: mengyujackson121 Date: Sat, 5 Oct 2019 12:33:40 -0400 Subject: [PATCH 2/2] Fix wide header rows --- docs/source/_static/hackrtd.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/source/_static/hackrtd.css b/docs/source/_static/hackrtd.css index 47f8a0ec41..21d94b2e16 100644 --- a/docs/source/_static/hackrtd.css +++ b/docs/source/_static/hackrtd.css @@ -120,7 +120,17 @@ a.trio-help-hint, .trio-help-hint a:link, .trio-help-hint a:visited { white-space: normal !important; } + .wy-table-responsive table th { + /* This is a trio specific override since we have long header names compared to other projects who've had issues + with wide tables (allowing wrapping just in the cells isn't enough to shrink tables meaningfully). + */ + white-space: normal !important; + } + .wy-table-responsive { + /* This makes very wide tables look ugly and extend past their parent... Maybe allowing the scroll bar isn't so + bad in comparison (after the above 2 fixes). + */ overflow: visible !important; } }