From 4e299b09e42d55709f81b3676fa17a391471c47e Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 22 Feb 2018 14:26:54 +0200 Subject: [PATCH] Try to fix padding problem in code samples in docs --- docs/_static/sphinx_rtd_theme-hotfix.css | 3 +++ docs/conf.py | 8 ++++++-- requirements-doc.txt | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 docs/_static/sphinx_rtd_theme-hotfix.css diff --git a/docs/_static/sphinx_rtd_theme-hotfix.css b/docs/_static/sphinx_rtd_theme-hotfix.css new file mode 100644 index 00000000..c2a3d226 --- /dev/null +++ b/docs/_static/sphinx_rtd_theme-hotfix.css @@ -0,0 +1,3 @@ +.rst-content .highlight>pre, .rst-content .linenodiv>pre { + line-height: normal; +} diff --git a/docs/conf.py b/docs/conf.py index ad266d5b..f3e8ef7f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -117,10 +117,10 @@ html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +# html_context = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['_themes'] +#html_theme_path = ['_themes'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -290,3 +290,7 @@ texinfo_documents = [ autodoc_member_order = 'bysource' disqus_shortname = 'python-dependency-injector' + + +def setup(app): + app.add_stylesheet('sphinx_rtd_theme-hotfix.css') diff --git a/requirements-doc.txt b/requirements-doc.txt index 921bae57..cae6e8fb 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -1,3 +1,3 @@ sphinx -sphinx_rtd_theme==0.2.5b2 +sphinx_rtd_theme>=0.2.5b2 -e git://github.com/rmk135/sphinxcontrib-disqus.git#egg=sphinxcontrib-disqus