File tree 2 files changed +6
-3
lines changed
src/librustdoc/html/static/js
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1013,7 +1013,8 @@ function preLoadCss(cssUrl) {
1013
1013
return ;
1014
1014
}
1015
1015
1016
- const allCratesHeading = document . createElement ( "h3" ) ;
1016
+ // h2 puts this on the same level as the current crate name heading at the top
1017
+ const allCratesHeading = document . createElement ( "h2" ) ;
1017
1018
allCratesHeading . textContent = "Crates" ;
1018
1019
1019
1020
const allCratesSection = document . createElement ( "section" ) ;
@@ -1038,7 +1039,7 @@ function preLoadCss(cssUrl) {
1038
1039
for ( const headingText of headings ) {
1039
1040
// Empty string denotes a group with no named heading.
1040
1041
if ( headingText !== "" ) {
1041
- const crateCategoryHeading = document . createElement ( "h4 " ) ;
1042
+ const crateCategoryHeading = document . createElement ( "h3 " ) ;
1042
1043
crateCategoryHeading . textContent = headingText ;
1043
1044
allCratesSection . appendChild ( crateCategoryHeading ) ;
1044
1045
}
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ call-function: ("switch-theme", {"theme": "light"})
48
48
assert-text: (".sidebar > .sidebar-crate > h2 > a", "test_docs")
49
49
// Crate root has no "location" element
50
50
assert-count: (".sidebar .location", 0)
51
- assert-count: (".sidebar h2", 1)
51
+ // Crate root has two h2s, the second of which is the the crate list
52
+ assert-count: (".sidebar h2", 2)
53
+ assert-text: (".sidebar #rustdoc-modnav h2", "Crates")
52
54
assert-text: ("#all-types", "All Items")
53
55
assert-css: ("#all-types", {"color": "#356da4"})
54
56
// We check that we have the crates list and that the "current" on is "test_docs".
You can’t perform that action at this time.
0 commit comments