From 117e663efe7b3e9b9814766da0db76a6960d45f5 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 25 Jan 2021 22:09:32 +0100 Subject: [PATCH] docs/theme: Remove horizontal scrolling on small screens This clips overflowing padding/margins and thereby removes non-"content" that's just off-screen, making the site scrollable. The exception here is for tables - we allow scrolling the *section* divs for those (because I have no idea how to only make the scrollable), if necessary of course. --- doc_src/python_docs_theme/static/pydoctheme.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc_src/python_docs_theme/static/pydoctheme.css b/doc_src/python_docs_theme/static/pydoctheme.css index e8929cab0..d1181b72b 100644 --- a/doc_src/python_docs_theme/static/pydoctheme.css +++ b/doc_src/python_docs_theme/static/pydoctheme.css @@ -30,6 +30,14 @@ div.related { margin-top: 0; } +div.section { + /* Make scrollable when it's too wide + Really only happens with tables, the rest flows nicely, + but I have no idea how to make the tables themselves scrollable + */ + overflow-y: auto; +} + div.related a:hover { color: #0095C4; } @@ -242,5 +250,10 @@ dl > dt span ~ em { box-shadow: 0; width: 100%; padding: 0; + /* We have some padding/margins that would overflow - just remove it */ + overflow: clip; } + div.footer { + margin: 0; + } }