diff --git a/doc/code-cells.ipynb b/doc/code-cells.ipynb index ecdf3877..f98c5a70 100644 --- a/doc/code-cells.ipynb +++ b/doc/code-cells.ipynb @@ -132,6 +132,23 @@ "\"I'm the 'normal' output\"" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Very long output (>600px) is scrolled:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for i in range(50):\n", + " print(i)" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/src/nbsphinx/_static/nbsphinx-code-cells.css_t b/src/nbsphinx/_static/nbsphinx-code-cells.css_t index c3fd7e35..5724e568 100644 --- a/src/nbsphinx/_static/nbsphinx-code-cells.css_t +++ b/src/nbsphinx/_static/nbsphinx-code-cells.css_t @@ -128,6 +128,11 @@ div.nboutput.container div.output_area { width: 100%; } } +/* scroll long text outputs vertically */ +div.nboutput.container div.output_area:has(pre) { + max-height: 600px; +} + /* input area */ div.nbinput.container div.input_area {