Skip to content

Inproper styling of dataframes for myst-nb + pydata theme when contained in ipywidget (2)Β #1740

@ClementPinard

Description

@ClementPinard

Hi, this is a small continuation from #1063

Last time, there was a problem with the table collapsing, this is solved now (thank you !)

Now I am in search for a solution to style the dataframe in a widget the same way as directly outputted in the cell

image

As you can see, the dataframe in the tab widget does not have the same color (and the widget is not dark themed as well), and more problematic, the horizontal scroll bar is gone.

Note that contrary to the last problem, this one is present in both nbconvert and nb-sphinx

Also, note that the light mode has the right dataframe colors, but still does not have the scroll bar. As such, I am not sure the scroll bar disappearing is related to pydata theme

As for the last issue, you can recreate the problem in this (updated) repo : https://github.com/ClementPinard/pydata-nbsphinx-pandas-bug-example

Versions:

Sphinx = 5.3.0
jupyter = 1.0.0
pydata-sphinx-theme = 0.15.2
myst-nb = 1.0.0

In short, it would be nice to

  • style the widgets in dark theme
  • style the dataframe in widgets in dark theme
  • add a "overflow: auto" attribute somewhere instead of hidden

Metadata

Metadata

Assignees

No one assigned

    Labels

    tag: designItems related to design tasks or improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions