Skip to content

Commit

Permalink
Add custom css overrides for wrapping in tables
Browse files Browse the repository at this point in the history
  • Loading branch information
FichteFoll committed Jun 19, 2015
1 parent ac50540 commit e0793e6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
22 changes: 22 additions & 0 deletions source/_static/rtd_theme_overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* !important prevents the common CSS stylesheets from
* overriding this as on RTD they are loaded after this stylesheet.
*/

/* override table width restrictions */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal !important;
}

/* The following is not needed, but kept for reference: */
/*
.wy-table-responsive {
overflow: visible !important;
}
*/

/* override weird spacing of explicit line blocks; currently not needed */
/*
.rst-content .line-block {
margin-left: 0 !important;
}
*/
12 changes: 10 additions & 2 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
uses_rtd_theme = True

# Only import and set the theme if we're building docs locally
if not os.environ.get('READTHEDOCS', None) == 'True':
Expand All @@ -101,10 +102,17 @@
except:
print("could not find sphinx_rtd_theme, using default")
print(sys.path)
uses_rtd_theme = False
else:
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]


def setup(app):
# app.add_javascript("custom.js")
if uses_rtd_theme:
app.add_stylesheet("rtd_theme_overrides.css")

# otherwise, readthedocs.org uses their theme by default, so no need to specify it

# Theme options are theme-specific and customize the look and feel of a theme
Expand Down Expand Up @@ -192,8 +200,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'SublimeTextHelp.tex', u'Sublime Text Unofficial Documentation',
u'guillermooo', 'manual'),
('index', 'SublimeTextHelp.tex', u'Sublime Text Unofficial Documentation',
u'guillermooo', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down

0 comments on commit e0793e6

Please sign in to comment.