Skip to content

Commit

Permalink
Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
bors committed Jun 30, 2021
2 parents 7ede6e2 + 2fd1229 commit 5d34076
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 13 additions & 0 deletions src/test/rustdoc-gui/font-weight.goml
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
2 changes: 2 additions & 0 deletions src/test/rustdoc-gui/src/lib2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ impl Foo {
pub trait Trait {
type X;
const Y: u32;

fn foo() {}
}

impl Trait for Foo {
Expand Down
2 changes: 0 additions & 2 deletions src/test/rustdoc-gui/type-weight.rs

This file was deleted.

0 comments on commit 5d34076

Please sign in to comment.