feat(rtd): provide custom CSS file for overriding in-use Sphinx theme

* `sphinx_rtd_theme` known issue: long lines in tables do not wrap by default
  - https://github.com/rtfd/sphinx_rtd_theme/issues/117
This commit is contained in:
Imran Iqbal 2019-03-01 15:08:58 +00:00
parent 18d3924dcb
commit 24bd338334
No known key found for this signature in database
GPG key ID: 6D8629439D2B7819
2 changed files with 40 additions and 0 deletions

18
docs/_static/css/custom.css vendored Normal file
View file

@ -0,0 +1,18 @@
/*
Override styles for in-use Sphinx theme
*/
/* override table width restrictions */
.wy-table-responsive table th
, .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;
}

View file

@ -149,3 +149,25 @@ latex_documents = [
'manual',
),
]
# -- Functions: `setup`, docstring preprocessing, etc. -----------------------
def setup(app):
"""Prepare the Sphinx application object.
Used for providing a custom CSS file for override styles.
Parameters
----------
app : object
The Sphinx application object.
Returns
-------
app : object
The Sphinx application object.
"""
app.add_stylesheet('css/custom.css')
return app