diff --git a/CHANGES b/CHANGES index 5ce96bac1..db12b571a 100644 --- a/CHANGES +++ b/CHANGES @@ -32,6 +32,7 @@ Bugs fixed an attribute and module that are same name * #7806: viewcode: Failed to resolve viewcode references on 3rd party builders * #7838: html theme: List items have extra vertical space +* #7878: html theme: Undesired interaction between "overflow" and "float" Testing -------- diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index e0f24c8a1..a22ef80d4 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -15,6 +15,12 @@ div.clearer { clear: both; } +div.section::after { + display: block; + content: ''; + clear: left; +} + /* -- relbar ---------------------------------------------------------------- */ div.related { @@ -328,8 +334,8 @@ p.sidebar-title { font-weight: bold; } -div.admonition, div.topic, pre, div[class|="highlight"] { - clear: both; +div.admonition, div.topic, blockquote { + clear: left; } /* -- topics ---------------------------------------------------------------- */ @@ -338,7 +344,6 @@ div.topic { border: 1px solid #ccc; padding: 7px; margin: 10px 0 10px 0; - overflow-x: auto; } p.topic-title { @@ -353,7 +358,6 @@ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; - overflow-x: auto; } div.admonition dt { @@ -378,6 +382,15 @@ div.admonition > :last-child { margin-bottom: 0; } +div.sidebar::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + /* -- tables ---------------------------------------------------------------- */ table.docutils { @@ -680,6 +693,10 @@ pre { overflow-y: hidden; /* fixes display issues on Chrome browsers */ } +pre, div[class|="highlight"] { + clear: both; +} + span.pre { -moz-hyphens: none; -ms-hyphens: none;