From 3e1a8f8668ed45a3b42285cbac46dd7a2f2a3b57 Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Thu, 2 May 2024 17:06:03 +0100 Subject: [PATCH] Add CSS tweak to hide summary when a details section is opened --- manual/source/_static/details_summary_hide.css | 5 +++++ manual/source/conf.py | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 manual/source/_static/details_summary_hide.css diff --git a/manual/source/_static/details_summary_hide.css b/manual/source/_static/details_summary_hide.css new file mode 100644 index 0000000000..7b608238c7 --- /dev/null +++ b/manual/source/_static/details_summary_hide.css @@ -0,0 +1,5 @@ +details[open] > summary { + width: 0.5em; + height: 2.2ex; + overflow: hidden; +} diff --git a/manual/source/conf.py b/manual/source/conf.py index 3904328335..9b90263f10 100644 --- a/manual/source/conf.py +++ b/manual/source/conf.py @@ -89,6 +89,9 @@ ], } +def setup(app): + app.add_css_file('details_summary_hide.css') + # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large.