From 8aec7391344933ef0479759182b966c2fb6458ad Mon Sep 17 00:00:00 2001 From: gabalafou Date: Thu, 23 May 2024 06:58:10 -0400 Subject: [PATCH] Add CSS to allow scrolling of ipywidget (#1760) This addresses one of the issues in #1740: missing horizontal scrollbar. - Add CSS rule to allow scrolling - Add ipywidgets example to the examples/pydata page --- pyproject.toml | 1 + .../assets/styles/extensions/_pydata.scss | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e816865b66..1856c9e21b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ doc = [ "nbsphinx", "ipyleaflet", "colorama", + "ipywidgets" ] test = ["pytest", "pytest-cov", "pytest-regressions"] dev = ["pyyaml", "pre-commit", "nox", "pydata-sphinx-theme[doc,test]"] diff --git a/src/pydata_sphinx_theme/assets/styles/extensions/_pydata.scss b/src/pydata_sphinx_theme/assets/styles/extensions/_pydata.scss index 94a1994cce..56ee5fbf42 100644 --- a/src/pydata_sphinx_theme/assets/styles/extensions/_pydata.scss +++ b/src/pydata_sphinx_theme/assets/styles/extensions/_pydata.scss @@ -6,3 +6,9 @@ .xr-wrap[hidden] { display: block !important; } + +// ipywidgets +.jp-OutputArea-output.lm-Widget { + // override overflow:hidden rule from Lumino (.lm-Widget) to allow scrolling + overflow: auto; +}