pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
561 stars 304 forks source link

Add CSS to allow scrolling of ipywidget #1760

Closed gabalafou closed 1 month ago

gabalafou commented 3 months ago

This PR addresses one of the issues in #1740: missing horizontal scrollbar.

Changes:

gabalafou commented 3 months ago

Related:

1041 and this PR address two related but different scenarios. They both deal with notebook cell outputs. But this PR deals specifically when the cell output uses ipywidgets.

1041 put an overflow-x: auto rule on notebook cell outputs rendered to HTML by myst-nb because otherwise, the default value of the output div would have overflow: visible, and wide tables inside the output div would cause the entire page to expand so the user would have to scroll the entire page horizontally. (Note: nbsphinx adds overflow: auto by default.)

This PR, on the other hand, has to override an overflow: hidden rule put on a container div via ipywidgets (via Lumino), regardless of whether the widget is rendered to HTML by myst-nb or nbsphinx.

Carreau commented 1 month ago

Ok, let's get this one in to get feedback