Skip to content

Commit 5d34076

Browse files
committed
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).
2 parents 7ede6e2 + 2fd1229 commit 5d34076

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

src/librustdoc/html/static/rustdoc.css

+9-3
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,15 @@ h1.fqn > .in-band > a:hover {
146146
h2, h3, h4 {
147147
border-bottom: 1px solid;
148148
}
149-
.impl, .impl-items .method,
150-
.impl-items .type, .impl-items .associatedconstant,
151-
.impl-items .associatedtype {
149+
.impl,
150+
.impl-items .method,
151+
.methods .method,
152+
.impl-items .type,
153+
.methods .type,
154+
.impl-items .associatedconstant,
155+
.methods .associatedconstant,
156+
.impl-items .associatedtype,
157+
.methods .associatedtype {
152158
flex-basis: 100%;
153159
font-weight: 600;
154160
margin-top: 16px;

src/test/rustdoc-gui/font-weight.goml

+13
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@ assert-css: ("//*[@class='structfield small-section-header']//a[text()='Alias']"
55
assert-css: ("#method\.a_method > code", {"font-weight": "600"})
66
assert-css: ("#associatedtype\.X > code", {"font-weight": "600"})
77
assert-css: ("#associatedconstant\.Y > code", {"font-weight": "600"})
8+
9+
goto: file://|DOC_PATH|/test_docs/type.SomeType.html
10+
assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
11+
12+
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
13+
assert-css: (".impl-items .method", {"font-weight": "600"}, ALL)
14+
15+
goto: file://|DOC_PATH|/lib2/trait.Trait.html
16+
assert-count: (".methods .type", 1)
17+
assert-css: (".methods .type", {"font-weight": "600"})
18+
assert-count: (".methods .constant", 1)
19+
assert-css: (".methods .constant", {"font-weight": "600"})
20+
assert-css: (".methods .method", {"font-weight": "600"})

src/test/rustdoc-gui/src/lib2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ impl Foo {
2323
pub trait Trait {
2424
type X;
2525
const Y: u32;
26+
27+
fn foo() {}
2628
}
2729

2830
impl Trait for Foo {

src/test/rustdoc-gui/type-weight.rs

-2
This file was deleted.

0 commit comments

Comments
 (0)