From f228defa0a2ebf4a73bbc6df02f0a56391844185 Mon Sep 17 00:00:00 2001 From: lllangWV Date: Thu, 15 May 2025 09:01:53 -0400 Subject: [PATCH] feat(docs): Add notebook.css for output area styling Introduced a new CSS file, notebook.css, to cap output areas at 15 lines and enable scrolling for better readability in Jupyter notebooks. Updated conf.py to include this new stylesheet alongside the existing custom.css, enhancing the visual presentation of output in the documentation. --- docs/source/_static/notebook.css | 6 ++++++ docs/source/conf.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/source/_static/notebook.css diff --git a/docs/source/_static/notebook.css b/docs/source/_static/notebook.css new file mode 100644 index 0000000..b90a126 --- /dev/null +++ b/docs/source/_static/notebook.css @@ -0,0 +1,6 @@ +/* cap all output at ~15 lines, then scroll */ +/* targets nbsphinx output areas too */ +.output_area pre { + max-height: calc(1.2em * 15) !important; + overflow-y: auto !important; + } \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 67c0468..95c9ea7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -190,7 +190,8 @@ "logo_link": "index.html", # Specify the link for the logo if needed } -html_css_files = ["css/custom.css"] +html_css_files = ["css/custom.css", "notebook.css"] + html_js_files = ["js/custom.js"]