Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JupyterLab: "Create New View for Output": CSS broken #2837

Open
vogelsgesang opened this issue Mar 31, 2020 · 1 comment
Open

JupyterLab: "Create New View for Output": CSS broken #2837

vogelsgesang opened this issue Mar 31, 2020 · 1 comment

Comments

@vogelsgesang
Copy link

Reproduction steps

  1. Create a new notebook
  2. Execute the code
    import ipywidgets
    ipywidgets.Label(value="Some label")
    
  3. Open the context menu by rigth-clicking on the displayed widget
  4. Click on "Create New View for Output"

Observed behavior

The opened "Output View" panel has a scrollbar on the right side
scrollbar

Expected behavior

No scrollbar, since the label fits into the output area easily

JupyterLab version 2.0.1
ipywidgets version 7.5.1
@jupyter-widgets/jupyterlab-manager version 2.0.0
Checked in Chrome and Firefox

@vogelsgesang
Copy link
Author

Looking into the dev-tools, it seems this is caused by bad interaction between the jupyter-widgets CSS class and the CSS rule .jp-LinkedOutputView .jp-OutputArea-output:only-child

scrollbar-debug

The jupyter-widgets class adds a margin of 2px on each side.
The CSS rule .jp-LinkedOutputView .jp-OutputArea-output:only-child sets the height to 100%.
This leads to an overall height of 100% + 2*2px.
Since this is larger than 100%, the scrollbar appears.

It seems this might have fixed as a lucky by-product of merging #2500.
But I am not sure how to verify/how to install ipywidgets 8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant