Skip to content

Commit

Permalink
Alternate method using inline css to hide regular html output in an u…
Browse files Browse the repository at this point in the history
…ntrusted notebook (pydata#5880)

* Update formatting_html.py

* override inline display:none when css is loaded

* remove semicolon

Co-authored-by: Illviljan <[email protected]>
  • Loading branch information
2 people authored and snowman2 committed Feb 9, 2022
1 parent 737653a commit cfc6a66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xarray/core/formatting_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def _obj_repr(obj, header_components, sections):
"<div>"
f"{icons_svg}<style>{css_style}</style>"
f"<pre class='xr-text-repr-fallback'>{escape(repr(obj))}</pre>"
"<div class='xr-wrap' hidden>"
"<div class='xr-wrap' style='display:none'>"
f"{header}"
f"<ul class='xr-sections'>{sections}</ul>"
"</div>"
Expand Down
2 changes: 1 addition & 1 deletion xarray/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body.vscode-dark {
}

.xr-wrap {
display: block;
display: block !important;
min-width: 300px;
max-width: 700px;
}
Expand Down

0 comments on commit cfc6a66

Please sign in to comment.