From 04c4596fb699b50ec9414a13682615043f045083 Mon Sep 17 00:00:00 2001 From: Lukas Engelter Date: Tue, 15 Aug 2023 11:11:51 +0200 Subject: [PATCH 1/2] fix: background colors breaking at horizontal scrolling on smaller devices The body now grows to fit all the content, which makes the background colors of the theme no longer break --- CHANGES | 3 +++ sphinx/themes/agogo/static/agogo.css_t | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 50962197c99..0aadb65b1b4 100644 --- a/CHANGES +++ b/CHANGES @@ -86,6 +86,9 @@ Bugs fixed Patch by Bénédikt Tran. * #11591: Fix support for C coverage in ``sphinx.ext.coverage`` extension. Patch by Stephen Finucane. +* #11594: HTML Theme: Enhancements to horizontal scrolling on smaller + devices in the ``agogo`` theme. + Patch by Lukas Engelter. Testing ------- diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index e41dfb8f0a5..48457b34ec7 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -19,6 +19,10 @@ body { line-height: 1.4em; color: black; background-color: {{ theme_bgcolor }}; + + /* fix for background colors breaking at horizontal + scrolling on smaller devices */ + min-width: fit-content; } From b3b11c107f06dc3194eecf5a59142f2cc99837ac Mon Sep 17 00:00:00 2001 From: Lukas Engelter Date: Tue, 15 Aug 2023 11:12:20 +0200 Subject: [PATCH 2/2] feature: add whitespace around the web page frame to ease the eyes on smaller screens --- sphinx/themes/agogo/static/agogo.css_t | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index 48457b34ec7..e885d8ce037 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -135,8 +135,7 @@ dt:target, .highlighted { /* Header */ div.header { - padding-top: 10px; - padding-bottom: 10px; + padding: 1em; } div.header .headertitle { @@ -173,8 +172,7 @@ img.logo { /* Content */ div.content-wrapper { background-color: white; - padding-top: 20px; - padding-bottom: 20px; + padding: 1em; } div.document {