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.
This commit is contained in:
Fabian Homborg 2022-06-01 17:48:51 +02:00
parent 10fb5f2d37
commit 4712da3eb1

View file

@ -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;
}