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

Wide notebook outputs should have a max-width and scroll #1038

Closed
choldgraf opened this issue Oct 26, 2022 · 2 comments · Fixed by #1041
Closed

Wide notebook outputs should have a max-width and scroll #1038

choldgraf opened this issue Oct 26, 2022 · 2 comments · Fixed by #1041

Comments

@choldgraf
Copy link
Collaborator

Currently, the notebook outputs from MyST NB don't have a maximum width, and so if they are particularly wide, then they'll make the whole page horizontally scrollable. For example, from this page:

chrome_kLdQVo0LZf

Proposal

We should cap the width of the output container in notebook outputs, and make it horizontally scrollable along with adding scrollbar-style to it. For example, by adding this rule we can make it scrollable:

div.cell_output .output {
    max-width: 100%;
    overflow-x: auto;
}

results in:

chrome_BhFbHnE6nF

@12rambau
Copy link
Collaborator

should we add the custom scrollbar as well ?

@choldgraf
Copy link
Collaborator Author

Makes sense to me!

12rambau added a commit to 12rambau/pydata-sphinx-theme that referenced this issue Oct 27, 2022
choldgraf pushed a commit that referenced this issue Nov 3, 2022
* FIX: style table generated by myst-NB
Fix #1038

* lint

* reorder folders
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

Successfully merging a pull request may close this issue.

2 participants