Skip to content

Commit ffbc655

Browse files
authored
Resolve issue with left-hand side panel (#5762)
* enforce light mode for doxygen docs: removed dark theme elements * fix TOC
1 parent f8d8933 commit ffbc655

File tree

1 file changed

+58
-12
lines changed

1 file changed

+58
-12
lines changed

doxygen/hdf5doxy.css

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,72 @@
11
/**** Table of content in the side-nav ****/
22

3+
/*
4+
* Collapse the navigation tree to zero height instead of removing it from the layout.
5+
* This allows the Doxygen scripts to correctly calculate the side-panel's width
6+
* and apply the proper 'margin-left' to the main content, preventing overlap.
7+
*/
8+
#nav-tree {
9+
height: 0;
10+
overflow: hidden;
11+
padding: 0;
12+
margin: 0;
13+
border: none;
14+
}
15+
16+
/* Make sure the side panel itself allows overflow */
17+
#side-nav {
18+
overflow: visible; /* Don't clip the TOC */
19+
width: 245px; /* Set initial width (default is usually around 250px) */
20+
min-width: 200px; /* Prevent it from getting too small */
21+
}
322

23+
/* Style the TOC to fill the entire side panel with proper scrolling */
424
div.toc {
5-
margin:0;
6-
padding: 0.3em 0 0 0;
7-
width:100%;
8-
float:none;
9-
position:absolute;
10-
bottom:0;
11-
border-radius:0px;
12-
border-style: solid none none none;
13-
max-height:50%;
14-
overflow-y: scroll;
25+
margin: 0;
26+
padding: 1em 0 0 0;
27+
width: 100%;
28+
height: calc(100vh - 2em); /* Fixed height to enable proper scrolling */
29+
float: none;
30+
position: relative;
31+
border-radius: 0px;
32+
border-style: none;
33+
overflow: auto; /* Both horizontal and vertical scrolling */
34+
box-sizing: border-box;
1535
}
1636

1737
div.toc h3 {
1838
margin-left: 0.5em;
1939
margin-bottom: 0.2em;
2040
}
2141

42+
/* Make sure nested lists also scroll properly */
2243
div.toc ul {
2344
margin: 0.2em 0 0.4em 0.5em;
45+
width: max-content; /* Allow content to determine width */
46+
min-width: 100%;
47+
}
48+
49+
/* Ensure the TOC root container can expand */
50+
div.toc > ul {
51+
width: max-content;
52+
min-width: 100%;
53+
}
54+
55+
/* Ensure TOC entries don't wrap and enable horizontal scrolling */
56+
div.toc li a {
57+
white-space: nowrap;
58+
display: inline-block; /* Changed from block to inline-block */
59+
width: auto; /* Let content determine width */
60+
min-width: 100%; /* Ensure it takes at least full container width */
61+
}
62+
63+
/*
64+
* Prevent long TOC entries from wrapping.
65+
* This keeps each entry on a single line and makes the panel
66+
* horizontally scrollable if an entry is too wide.
67+
*/
68+
#side-nav div.toc li a {
69+
white-space: nowrap;
2470
}
2571

2672
span.cpp11,span.cpp14,span.cpp17 {
@@ -78,9 +124,9 @@ a[href^="https://"]::after
78124
width: 11px;
79125
height: 11px;
80126
margin-left: 4px;
81-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
127+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5-.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
82128
background-position: center;
83129
background-repeat: no-repeat;
84130
background-size: contain;
85131
display: inline-block;
86-
}
132+
}

0 commit comments

Comments
 (0)