Skip to content

Commit b4f404b

Browse files
Fix wrong font being used for tooltips i icons
1 parent e1b9081 commit b4f404b

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

src/librustdoc/html/static/css/rustdoc.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,10 @@ instead, we check that it's not a "finger" cursor.
18381838
border-right: 3px solid var(--target-border-color);
18391839
}
18401840

1841+
a.tooltip {
1842+
font-family: var(--font-family);
1843+
}
1844+
18411845
.code-header a.tooltip {
18421846
color: inherit;
18431847
margin-right: 15px;

tests/rustdoc-gui/notable-trait.goml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ define-function: (
88
[x, i_x],
99
block {
1010
// Checking they have the same y position.
11-
compare-elements-position: (
11+
compare-elements-position-near: (
1212
"//*[@id='method.create_an_iterator_from_read']//a[normalize-space()='NotableStructWithLongName']",
1313
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
14-
["y"],
14+
{"y": 1},
1515
)
1616
// Checking they don't have the same x position.
1717
compare-elements-position-false: (

tests/rustdoc-gui/src/test_docs/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,3 +767,17 @@ pub mod impls_indent {
767767
pub fn bar() {}
768768
}
769769
}
770+
771+
pub mod tooltips {
772+
pub struct X;
773+
774+
impl X {
775+
pub fn bar() -> Vec<u8> {
776+
Vec::new()
777+
}
778+
}
779+
780+
pub fn bar() -> Vec<u8> {
781+
Vec::new()
782+
}
783+
}

0 commit comments

Comments
 (0)