Make tables scroll if they overflow.
This commit is contained in:
		
							
								
								
									
										4
									
								
								docs/_static/style.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								docs/_static/style.css
									
									
									
									
										vendored
									
									
								
							@@ -804,6 +804,10 @@ dd {
 | 
				
			|||||||
  background-color: var(--api-entry-background);
 | 
					  background-color: var(--api-entry-background);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.table-wrapper {
 | 
				
			||||||
 | 
					  overflow-x: auto;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
table.docutils {
 | 
					table.docutils {
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,14 @@ class DPYHTML5Translator(HTML5Translator):
 | 
				
			|||||||
        self.section_level -= 1
 | 
					        self.section_level -= 1
 | 
				
			||||||
        self.body.append('</section>\n')
 | 
					        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):
 | 
					class DPYStandaloneHTMLBuilder(StandaloneHTMLBuilder):
 | 
				
			||||||
    # This is mostly copy pasted from Sphinx.
 | 
					    # This is mostly copy pasted from Sphinx.
 | 
				
			||||||
    def write_genindex(self) -> None:
 | 
					    def write_genindex(self) -> None:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user