mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-10 14:51:43 +00:00
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:
parent
18d3924dcb
commit
24bd338334
2 changed files with 40 additions and 0 deletions
18
docs/_static/css/custom.css
vendored
Normal file
18
docs/_static/css/custom.css
vendored
Normal 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;
|
||||
}
|
||||
|
22
docs/conf.py
22
docs/conf.py
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue