rustdoc: remove left border from `.src-line-numbers > a`

This commit is contained in:
Michael Howell 2022-10-28 09:51:57 -07:00
parent 07bb2f701e
commit ba4ae13528
2 changed files with 10 additions and 3 deletions

View File

@ -578,11 +578,13 @@ ul.block, .block li {
.src-line-numbers a {
color: var(--src-line-numbers-span-color);
}
.src-line-numbers .line-highlighted {
background-color: var(--src-line-number-highlighted-background-color);
}
.src-line-numbers :target {
background-color: transparent;
border-right: none;
padding-right: 0;
}
.src-line-numbers .line-highlighted {
background-color: var(--src-line-number-highlighted-background-color);
}
.search-loading {

View File

@ -6,6 +6,11 @@ click: ".src-line-numbers > a:nth-child(4)" // This is the anchor for line 4.
// Ensure that the page URL was updated.
assert-document-property: ({"URL": "lib.rs.html#4"}, ENDS_WITH)
assert-attribute: ("//*[@id='4']", {"class": "line-highlighted"})
// Ensure that the default style, with the right border, isn't used.
assert-css: ("//*[@id='4']", {"border-right-width": "0px"})
reload:
assert-attribute: ("//*[@id='4']", {"class": "line-highlighted"})
assert-css: ("//*[@id='4']", {"border-right-width": "0px"})
// We now check that the good anchors are highlighted
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html#4-6"
assert-attribute-false: (".src-line-numbers > a:nth-child(3)", {"class": "line-highlighted"})