mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 08:44:10 +00:00
Make tables scroll if they overflow.
This commit is contained in:
parent
8feb74a018
commit
c69f7c7bd8
4
docs/_static/style.css
vendored
4
docs/_static/style.css
vendored
@ -804,6 +804,10 @@ dd {
|
||||
background-color: var(--api-entry-background);
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table.docutils {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -12,6 +12,14 @@ class DPYHTML5Translator(HTML5Translator):
|
||||
self.section_level -= 1
|
||||
self.body.append('</section>\n')
|
||||
|
||||
def visit_table(self, node):
|
||||
self.body.append('<div class="table-wrapper">')
|
||||
super().visit_table(node)
|
||||
|
||||
def depart_table(self, node):
|
||||
super().depart_table(node)
|
||||
self.body.append('</div>')
|
||||
|
||||
class DPYStandaloneHTMLBuilder(StandaloneHTMLBuilder):
|
||||
# This is mostly copy pasted from Sphinx.
|
||||
def write_genindex(self) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user