From 4712da3eb1d2324e5fc624f77d96b06eb8898930 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 1 Jun 2022 17:48:51 +0200 Subject: [PATCH] docs theme: Make work with sphinx 4.5 and 5.0 Sphinx 5.0 makes the document div a flex container, which clashes badly with the margin that earlier versions need. So we remove the margin and flex the div ourselves, which should work with either. It's time we make this freestanding - these changes are annoying. --- doc_src/python_docs_theme/static/pydoctheme.css | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc_src/python_docs_theme/static/pydoctheme.css b/doc_src/python_docs_theme/static/pydoctheme.css index 1fe8ad68e..66b5147be 100644 --- a/doc_src/python_docs_theme/static/pydoctheme.css +++ b/doc_src/python_docs_theme/static/pydoctheme.css @@ -111,6 +111,10 @@ div.documentwrapper { float: none; } +div.document { + display: flex; +} + div.document, div.body, div.warning { background-color: inherit; color: inherit; @@ -350,6 +354,11 @@ div.sphinxsidebar ul { margin: 1em 10px 1em 10px; } + +div.bodywrapper { + margin: 0; +} + /* On screens that are less than 700px wide remove anything non-essential - the sidebar, the gradient background, ... */ @media screen and (max-width: 700px) { @@ -377,10 +386,6 @@ div.sphinxsidebar ul { display: none !important; } div.content {margin-left: 0;} - - div.bodywrapper { - margin: 0; - } div.body { padding: 1rem; }