diff --git a/doc/_themes/odoodoc/layout.html b/doc/_themes/odoodoc/layout.html
index af62f44bbb4..b0244e191b3 100644
--- a/doc/_themes/odoodoc/layout.html
+++ b/doc/_themes/odoodoc/layout.html
@@ -26,7 +26,7 @@
{%- endblock -%}
{%- block content -%}
-
+
{%- endblock -%}
@@ -34,6 +34,7 @@
{# sidebar to the left, except sidebar1 is *outside* div.document where
sidebar2 is inside, so inject sidebar into document block #}
{%- block document -%}
+ {%- if render_sidebar -%}
+ {%- endif -%}
{{ super() }}
{%- endblock -%}
{%- block sidebar1 -%}{%- endblock -%}
diff --git a/doc/_themes/odoodoc/static/style.css b/doc/_themes/odoodoc/static/style.css
index 7fc2d3dcb95..f7624440f81 100644
--- a/doc/_themes/odoodoc/static/style.css
+++ b/doc/_themes/odoodoc/static/style.css
@@ -6247,6 +6247,18 @@ body {
}
@media (min-width: 992px) {
.documentwrapper {
+ float: left;
+ width: 100%;
+ }
+}
+.with-sidebar .documentwrapper {
+ position: relative;
+ min-height: 1px;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+@media (min-width: 992px) {
+ .with-sidebar .documentwrapper {
float: left;
width: 75%;
}
@@ -6611,6 +6623,9 @@ div.section > h2 {
padding-top: 20px;
margin-top: 0;
}
+.body {
+ position: relative;
+}
.body > .section > .section {
margin-bottom: 60px;
}
diff --git a/doc/_themes/odoodoc/static/style.less b/doc/_themes/odoodoc/static/style.less
index 480e43c5cb8..763fe6027d3 100644
--- a/doc/_themes/odoodoc/static/style.less
+++ b/doc/_themes/odoodoc/static/style.less
@@ -37,6 +37,9 @@ body {
}
.documentwrapper {
+ .make-md-column(12);
+}
+.with-sidebar .documentwrapper {
.make-md-column(9);
}
.sphinxsidebar {
@@ -403,8 +406,12 @@ div.section > h2 {
margin-top: 0;
}
// ~docs-section
-.body > .section > .section {
- margin-bottom: 60px;
+.body {
+ // otherwise main section right column content may not be visible
+ position: relative;
+ > .section > .section {
+ margin-bottom: 60px;
+ }
}
.literal:extend(code) {}