Skip to content

Cells do not shrink when some sidebar content overlaps with them #248

@choldgraf

Description

@choldgraf

Sometimes there is sidebar content that should reduce the width of a cell's inputs or outputs (e.g. the {sidebar} directive). However, it seems that this doesn't cause the myst-nb cells to shrink.

I'm also not sure why the copybutton icon isn't moving over either, but I'm gonna open an issue in sphinx-copybutton for this (executablebooks/sphinx-copybutton#100).

An example:

image

generated with this markdown ````md --- jupytext: cell_metadata_filter: -all formats: md:myst text_representation: extension: .md format_name: myst format_version: 0.12 jupytext_version: 1.6.0 kernelspec: display_name: Python 3 language: python name: python3 ---

MyST Notebooks

Sphinx Copybutton works with MyST Notebooks as well. See below for the code inputs and outputs:

Regular cells

A regular cell:

% Note: I'm only including these sidebars to test that the copybutton stays within the code cell.

This cell doesn't display any outputs.
print("hi")

Notebook cells

Next we'll demo notebook cells to see if these are rendered correctly.

This cell will be executed and its outputs stored.
print("hi")
</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    🏷️ designRelated to look and feel of the themebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions