Skip to content

Commit c86d249

Browse files
committed
Use "Fira Sans" for crate list font
Fira Sans is what's used for module lists and other item lists. Previously, the default body font, "Source Serif Pro", was used for crate lists, which didn't visually match other item lists.
1 parent 397db05 commit c86d249

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/librustdoc/html/render/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1062,12 +1062,13 @@ themePicker.onblur = handleThemeButtonsBlur;
10621062
let content = format!(
10631063
"<h1 class='fqn'>\
10641064
<span class='in-band'>List of all crates</span>\
1065-
</h1><ul class='mod'>{}</ul>",
1065+
</h1>\
1066+
<ul class='crate mod'>{}</ul>",
10661067
krates
10671068
.iter()
10681069
.map(|s| {
10691070
format!(
1070-
"<li><a class=\"mod\" href=\"{}index.html\">{}</a></li>",
1071+
"<li><a class=\"crate mod\" href=\"{}index.html\">{}</a></li>",
10711072
ensure_trailing_slash(s),
10721073
s
10731074
)

src/librustdoc/html/static/themes/ayu.css

+3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ pre {
178178
.content span.externcrate, .content span.mod, .content a.mod {
179179
color: #acccf9;
180180
}
181+
.content ul.crate a.crate {
182+
font: 16px/1.6 "Fira Sans";
183+
}
181184
.content span.struct, .content a.struct {
182185
color: #ffa0a5;
183186
}

src/test/rustdoc/index-page.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
// @has foo/../index.html
88
// @has - '//span[@class="in-band"]' 'List of all crates'
9-
// @has - '//ul[@class="mod"]//a[@href="foo/index.html"]' 'foo'
10-
// @has - '//ul[@class="mod"]//a[@href="all_item_types/index.html"]' 'all_item_types'
9+
// @has - '//ul[@class="crate mod"]//a[@href="foo/index.html"]' 'foo'
10+
// @has - '//ul[@class="crate mod"]//a[@href="all_item_types/index.html"]' 'all_item_types'
1111
pub struct Foo;

0 commit comments

Comments
 (0)