Skip to content

Commit 568dd6f

Browse files
authored
fix html repr indexes section (#9768)
1 parent 314912c commit 568dd6f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

xarray/core/formatting_html.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def summarize_index(coord_names, index) -> str:
155155
return (
156156
f"<div class='xr-index-name'><div>{name}</div></div>"
157157
f"<div class='xr-index-preview'>{preview}</div>"
158-
f"<div></div>"
158+
# need empty input + label here to conform to the fixed CSS grid layout
159+
f"<input type='checkbox' disabled/>"
160+
f"<label></label>"
159161
f"<input id='{index_id}' class='xr-index-data-in' type='checkbox'/>"
160162
f"<label for='{index_id}' title='Show/Hide index repr'>{data_icon}</label>"
161163
f"<div class='xr-index-data'>{details}</div>"

xarray/static/css/style.css

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ body.vscode-dark {
7575
.xr-section-item input {
7676
display: inline-block;
7777
opacity: 0;
78+
height: 0;
7879
}
7980

8081
.xr-section-item input + label {

0 commit comments

Comments
 (0)