Rollup merge of #90571 - GuillaumeGomez:missing-bottom-border-sidebar, r=jsha
Fix missing bottom border for headings in sidebar Fixes #90568. r? ```@jsha```
This commit is contained in:
commit
3821ab231b
4 changed files with 26 additions and 17 deletions
|
@ -156,7 +156,8 @@ h1.fqn > .in-band > a:hover {
|
|||
section hierarchies. */
|
||||
h2,
|
||||
.top-doc h3,
|
||||
.top-doc h4 {
|
||||
.top-doc h4,
|
||||
.sidebar .others h3 {
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
h3.code-header {
|
||||
|
|
|
@ -566,6 +566,7 @@ function hideThemeButtonState() {
|
|||
// delayed sidebar rendering.
|
||||
window.initSidebarItems = function(items) {
|
||||
var sidebar = document.getElementsByClassName("sidebar-elems")[0];
|
||||
var others;
|
||||
var current = window.sidebarCurrent;
|
||||
|
||||
function addSidebarCrates(crates) {
|
||||
|
@ -594,7 +595,7 @@ function hideThemeButtonState() {
|
|||
li.appendChild(link);
|
||||
ul.appendChild(li);
|
||||
}
|
||||
sidebar.appendChild(div);
|
||||
others.appendChild(div);
|
||||
}
|
||||
|
||||
function block(shortty, longty) {
|
||||
|
@ -635,10 +636,14 @@ function hideThemeButtonState() {
|
|||
ul.appendChild(li);
|
||||
}
|
||||
div.appendChild(ul);
|
||||
sidebar.appendChild(div);
|
||||
others.appendChild(div);
|
||||
}
|
||||
|
||||
if (sidebar) {
|
||||
others = document.createElement("div");
|
||||
others.className = "others";
|
||||
sidebar.appendChild(others);
|
||||
|
||||
var isModule = hasClass(document.body, "mod");
|
||||
if (!isModule) {
|
||||
block("primitive", "Primitive Types");
|
||||
|
|
|
@ -109,6 +109,9 @@ assert-css: ("h6#sub-heading-for-enum-impl-item-doc", {"border-bottom-width": "0
|
|||
assert-css: ("h6#sub-sub-heading-for-enum-impl-item-doc", {"font-size": "15.2px"})
|
||||
assert-css: ("h6#sub-sub-heading-for-enum-impl-item-doc", {"border-bottom-width": "0px"})
|
||||
|
||||
assert-text: (".sidebar .others h3", "Modules")
|
||||
assert-css: (".sidebar .others h3", {"border-bottom-width": "1px"}, ALL)
|
||||
|
||||
goto: file://|DOC_PATH|/test_docs/union.HeavilyDocumentedUnion.html
|
||||
|
||||
assert-css: ("h1.fqn", {"font-size": "24px"})
|
||||
|
|
|
@ -4,17 +4,17 @@ assert-text: (".sidebar > .location", "Crate test_docs")
|
|||
assert-count: (".sidebar .location", 1)
|
||||
assert-text: (".sidebar-elems > #all-types", "See all test_docs's items")
|
||||
// We check that we have the crates list and that the "current" on is "test_docs".
|
||||
assert-text: (".sidebar-elems > .crate > ul > li > a.current", "test_docs")
|
||||
assert-text: (".sidebar-elems .crate > ul > li > a.current", "test_docs")
|
||||
// And we're also supposed to have the list of items in the current module.
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(2)", "Macros")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(3)", "Structs")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(4)", "Enums")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(5)", "Traits")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(6)", "Functions")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(7)", "Type Definitions")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(8)", "Unions")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(9)", "Keywords")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(1)", "Modules")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(2)", "Macros")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(3)", "Structs")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(4)", "Enums")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(5)", "Traits")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(6)", "Functions")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(7)", "Type Definitions")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(8)", "Unions")
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(9)", "Keywords")
|
||||
assert-text: ("#structs + .item-table .item-left > a", "Foo")
|
||||
click: "#structs + .item-table .item-left > a"
|
||||
|
||||
|
@ -24,13 +24,13 @@ assert-count: (".sidebar .location", 2)
|
|||
assert-false: ".sidebar-elems > .crate"
|
||||
// We now go back to the crate page to click on the "lib2" crate link.
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
click: ".sidebar-elems > .crate > ul > li:first-child > a"
|
||||
click: ".sidebar-elems .crate > ul > li:first-child > a"
|
||||
|
||||
// PAGE: lib2/index.html
|
||||
goto: file://|DOC_PATH|/lib2/index.html
|
||||
assert-text: (".sidebar > .location", "Crate lib2")
|
||||
// We check that we have the crates list and that the "current" on is now "lib2".
|
||||
assert-text: (".sidebar-elems > .crate > ul > li > a.current", "lib2")
|
||||
assert-text: (".sidebar-elems .crate > ul > li > a.current", "lib2")
|
||||
// We now go to the "foobar" function page.
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
|
||||
|
@ -57,6 +57,6 @@ assert-false: ".sidebar-elems > .crate"
|
|||
goto: ./sub_module/sub_sub_module/index.html
|
||||
assert-text: (".sidebar > .location", "Module sub_sub_module")
|
||||
// We check that we don't have the crate list.
|
||||
assert-false: ".sidebar-elems > .crate"
|
||||
assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions")
|
||||
assert-false: ".sidebar-elems .crate"
|
||||
assert-text: (".sidebar-elems .items > ul > li:nth-child(1)", "Functions")
|
||||
assert-text: ("#functions + .item-table .item-left > a", "foo")
|
||||
|
|
Loading…
Add table
Reference in a new issue