Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specific deactivation of table handling #1218

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Fixes
* Fix ``<pre>`` overflow (#1220)
* Fix literal/ref style inside ``<dl>`` (#1088)


Other Changes
-------------

Expand Down
13 changes: 13 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,16 @@ To release a new version of the theme, core team will take the following steps:

.. _PEP440: https://www.python.org/dev/peps/pep-0440/
.. _semantic versioning: http://semver.org/


Table handling
==============
The theme wraps tables into a ``div.wy-table-responsive`` container, to easily make tables responsive.

If this behavior is not needed for some specific tables, the class name ``rtd-exclude-wy-table`` must be set
for the table. This may be important especially for other Sphinx extensions, which create and configure tables
for their use case on their own.




2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/js/theme.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function ThemeNav () {
})

// Make tables responsive
$("table.docutils:not(.field-list,.footnote,.citation)")
$("table.docutils:not(.field-list,.footnote,.citation,.rtd-exclude-wy-table)")
.wrap("<div class='wy-table-responsive'></div>");

// Add extra class to responsive tables that contain
Expand Down