diff options
| author | bors <bors@rust-lang.org> | 2021-06-30 10:54:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-30 10:54:08 +0000 |
| commit | 5d34076975cd7661dca4e40e0c66a646a78ad091 (patch) | |
| tree | 5f1311338511b1136f48078a34d81d776b5b3a10 | |
| parent | 7ede6e2a2359c1bb9032baffa4fdafe5633749e3 (diff) | |
| parent | 2fd1229a1aad7d3335de588b29396886b92cdb48 (diff) | |
| download | rust-5d34076975cd7661dca4e40e0c66a646a78ad091.tar.gz rust-5d34076975cd7661dca4e40e0c66a646a78ad091.zip | |
Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157
Fix boldness (put it back where needed) I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 12 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/font-weight.goml | 13 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/lib2.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/type-weight.rs | 2 |
4 files changed, 24 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 89497e7b396..71123aa9a0e 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -146,9 +146,15 @@ h1.fqn > .in-band > a:hover { h2, h3, h4 { border-bottom: 1px solid; } -.impl, .impl-items .method, -.impl-items .type, .impl-items .associatedconstant, -.impl-items .associatedtype { +.impl, +.impl-items .method, +.methods .method, +.impl-items .type, +.methods .type, +.impl-items .associatedconstant, +.methods .associatedconstant, +.impl-items .associatedtype, +.methods .associatedtype { flex-basis: 100%; font-weight: 600; margin-top: 16px; diff --git a/src/test/rustdoc-gui/font-weight.goml b/src/test/rustdoc-gui/font-weight.goml index 80618112103..84e898660fa 100644 --- a/src/test/rustdoc-gui/font-weight.goml +++ b/src/test/rustdoc-gui/font-weight.goml @@ -5,3 +5,16 @@ assert-css: ("//*[@class='structfield small-section-header']//a[text()='Alias']" assert-css: ("#method\.a_method > code", {"font-weight": "600"}) assert-css: ("#associatedtype\.X > code", {"font-weight": "600"}) assert-css: ("#associatedconstant\.Y > code", {"font-weight": "600"}) + +goto: file://|DOC_PATH|/test_docs/type.SomeType.html +assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL) + +goto: file://|DOC_PATH|/test_docs/struct.Foo.html +assert-css: (".impl-items .method", {"font-weight": "600"}, ALL) + +goto: file://|DOC_PATH|/lib2/trait.Trait.html +assert-count: (".methods .type", 1) +assert-css: (".methods .type", {"font-weight": "600"}) +assert-count: (".methods .constant", 1) +assert-css: (".methods .constant", {"font-weight": "600"}) +assert-css: (".methods .method", {"font-weight": "600"}) diff --git a/src/test/rustdoc-gui/src/lib2.rs b/src/test/rustdoc-gui/src/lib2.rs index 6fa1b36b29b..77d384f3113 100644 --- a/src/test/rustdoc-gui/src/lib2.rs +++ b/src/test/rustdoc-gui/src/lib2.rs @@ -23,6 +23,8 @@ impl Foo { pub trait Trait { type X; const Y: u32; + + fn foo() {} } impl Trait for Foo { diff --git a/src/test/rustdoc-gui/type-weight.rs b/src/test/rustdoc-gui/type-weight.rs deleted file mode 100644 index 8b6518e7f31..00000000000 --- a/src/test/rustdoc-gui/type-weight.rs +++ /dev/null @@ -1,2 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/type.SomeType.html -assert-all: (".top-block .docblock p", {"font-weight": "400"}) |
