Skip to content

Commit bf85f96

Browse files
committed
Override sphinx_rtd_theme wide table handling
See readthedocs/sphinx_rtd_theme#117
1 parent 706c164 commit bf85f96

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/_static/theme_overrides.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* override table width restrictions */
2+
@media screen and (min-width: 767px) {
3+
4+
.wy-table-responsive table td {
5+
/* !important prevents the common CSS stylesheets from
6+
overriding this as on RTD they are loaded after this stylesheet */
7+
white-space: normal !important;
8+
}
9+
10+
.wy-table-responsive {
11+
overflow: visible !important;
12+
}
13+
14+
}

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@
117117
# a list of builtin themes.
118118
#html_theme = 'sphinx_rtd_theme'
119119

120+
def setup(app):
121+
# overrides for wide tables in RTD theme
122+
app.add_stylesheet('theme_overrides.css')
123+
120124
# Theme options are theme-specific and customize the look and feel of a theme
121125
# further. For a list of options available for each theme, see the
122126
# documentation.

0 commit comments

Comments
 (0)