Skip to content

Commit

Permalink
Make the code examples a little prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
waveform80 committed Jul 21, 2024
1 parent 028f1d6 commit 59a7a35
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
21 changes: 21 additions & 0 deletions docs/_static/style_override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* override table width restrictions */
@media screen and (min-width: 767px) {
.wy-table-responsive table td, .wy-table-responsive table th {
/* !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;
}
}

.rst-content div[class^="highlight"] {
border: 0 none;
margin-top: 0;
}

.rst-content div[class^="highlight"] pre {
line-height: 1.09;
}
7 changes: 6 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
root_doc = 'index'
templates_path = ['_templates']
exclude_patterns = ['_build']
highlight_language = 'python3'
highlight_language = 'console'
pygments_style = 'sphinx'
nitpicky = True

Expand Down Expand Up @@ -85,6 +85,11 @@
html_static_path = ['_static']
manpages_url = 'https://manpages.ubuntu.com/manpages/noble/en/man{section}/{page}.{section}.html'

# Hack to make wide tables work properly in RTD
# See https://github.com/snide/sphinx_rtd_theme/issues/117 for details
def setup(app):
app.add_css_file('style_override.css')

# -- Options for LaTeX output ---------------------------------------------

latex_engine = 'xelatex'
Expand Down

0 comments on commit 59a7a35

Please sign in to comment.