Skip to content

Commit

Permalink
fix html repr indexes section
Browse files Browse the repository at this point in the history
  • Loading branch information
benbovy committed Nov 12, 2024
1 parent 314912c commit 898a618
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xarray/core/formatting_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def summarize_index(coord_names, index) -> str:
return (
f"<div class='xr-index-name'><div>{name}</div></div>"
f"<div class='xr-index-preview'>{preview}</div>"
f"<div></div>"
# need empty input + label here to conform to the fixed CSS grid layout
f"<input type='checkbox' disabled/>"
f"<label></label>"
f"<input id='{index_id}' class='xr-index-data-in' type='checkbox'/>"
f"<label for='{index_id}' title='Show/Hide index repr'>{data_icon}</label>"
f"<div class='xr-index-data'>{details}</div>"
Expand Down
1 change: 1 addition & 0 deletions xarray/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ body.vscode-dark {
.xr-section-item input {
display: inline-block;
opacity: 0;
height: 0;
}

.xr-section-item input + label {
Expand Down

0 comments on commit 898a618

Please sign in to comment.