Skip to content

vh height div displaying by Ipython expand infinitely #16053

Open
@Marchlak

Description

@Marchlak

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Displaying in Div cells using IPython with a height style in vh units causes it to expand infinitely, eventually crashing the entire notebook.

from IPython.display import display, HTML

html_content = """
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Full Height Div</title>
    <style>
        #full-height-div {
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: lightgray;
            font-size: 24px;
            color: darkblue;
        }
    </style>
</head>
<body>
    <div id="full-height-div">
        This div is bugged sad :(
    </div>
</body>
</html>
"""

display(HTML(html_content))

VS Code Version

1.93.0

Jupyter Extension Version

v2024.8.1

Jupyter logs

No response

Coding Language and Runtime Version

Python, js

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugnotebook-output

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions