mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Rollup merge of #105320 - notriddle:notriddle/rustdoc-toggle-hideme-2, r=GuillaumeGomez
rustdoc: simplify CSS selectors on top-doc and non-exhaustive toggles This code uses a special `hideme` class anyway, so just style that.
This commit is contained in:
commit
dc07e1bbdd
@ -195,8 +195,7 @@ h1, h2, h3, h4, h5, h6,
|
||||
span.since,
|
||||
a.srclink,
|
||||
#help-button > a,
|
||||
details.rustdoc-toggle.top-doc > summary,
|
||||
details.rustdoc-toggle.non-exhaustive > summary,
|
||||
summary.hideme,
|
||||
.scraped-example-list,
|
||||
/* This selector is for the items listed in the "all items" page. */
|
||||
ul.all-items {
|
||||
@ -1484,6 +1483,7 @@ details.rustdoc-toggle {
|
||||
"Expand description" or "Show methods". */
|
||||
details.rustdoc-toggle > summary.hideme {
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
details.rustdoc-toggle > summary {
|
||||
@ -1546,13 +1546,6 @@ details.rustdoc-toggle > summary:focus-visible::before {
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
details.rustdoc-toggle.top-doc > summary,
|
||||
details.rustdoc-toggle.top-doc > summary::before,
|
||||
details.rustdoc-toggle.non-exhaustive > summary,
|
||||
details.rustdoc-toggle.non-exhaustive > summary::before {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
details.non-exhaustive {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
@ -3,3 +3,8 @@ goto: "file://" + |DOC_PATH| + "/test_docs/enum.WhoLetTheDogOut.html"
|
||||
|
||||
assert-css: (".variants > .variant", {"margin": "0px 0px 12px"})
|
||||
assert-css: (".variants > .docblock", {"margin": "0px 0px 32px 24px"})
|
||||
|
||||
assert-css: (
|
||||
"details.non-exhaustive > summary",
|
||||
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
|
||||
)
|
||||
|
@ -76,6 +76,7 @@ impl AsRef<str> for Foo {
|
||||
///
|
||||
/// # title!
|
||||
#[doc(alias = "ThisIsAnAlias")]
|
||||
#[non_exhaustive]
|
||||
pub enum WhoLetTheDogOut {
|
||||
/// Woof!
|
||||
Woof,
|
||||
|
@ -7,6 +7,10 @@ wait-for: 50
|
||||
// This is now collapsed so there shouldn't be the "open" attribute on details.
|
||||
assert-attribute-false: ("#main-content > details.top-doc", {"open": ""})
|
||||
assert-text: ("#toggle-all-docs", "[+]")
|
||||
assert-css: (
|
||||
"#main-content > details.top-doc > summary",
|
||||
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
|
||||
)
|
||||
click: "#toggle-all-docs"
|
||||
// Not collapsed anymore so the "open" attribute should be back.
|
||||
wait-for-attribute: ("#main-content > details.top-doc", {"open": ""})
|
||||
|
Loading…
Reference in New Issue
Block a user