Skip to content

Commit e81b59b

Browse files
Improve alias rendering
1 parent cf9209f commit e81b59b

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

src/librustdoc/html/static/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@
12731273
output += '<tr class="' + type + ' result"><td>' +
12741274
'<a href="' + item.href + '">' +
12751275
(item.is_alias === true ?
1276-
('<span><b>' + item.alias + ' </b></span><span ' +
1276+
('<span class="alias"><b>' + item.alias + ' </b></span><span ' +
12771277
'class="grey"><i>&nbsp;- see&nbsp;</i></span>') : '') +
12781278
item.displayPath + '<span class="' + type + '">' +
12791279
name + '</span></a></td><td>' +

src/librustdoc/html/static/rustdoc.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,4 @@ kbd {
13261326
}
13271327
#all-types > p {
13281328
margin: 5px 0;
1329-
}
1330-
1331-
.search-results td span.grey {
1332-
color: #ccc;
13331329
}

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ kbd {
382382
}
383383

384384
#theme-choices > button:hover, #theme-choices > button:focus {
385-
background-color: #444;
385+
background-color: #4e4e4e;
386386
}
387387

388388
@media (max-width: 700px) {
@@ -397,3 +397,10 @@ kbd {
397397
#all-types:hover {
398398
background-color: #606060;
399399
}
400+
401+
.search-results td span.alias {
402+
color: #fff;
403+
}
404+
.search-results td span.grey {
405+
color: #ccc;
406+
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,4 +390,11 @@ kbd {
390390
}
391391
#all-types:hover {
392392
background-color: #f9f9f9;
393+
}
394+
395+
.search-results td span.alias {
396+
color: #000;
397+
}
398+
.search-results td span.grey {
399+
color: #999;
393400
}

0 commit comments

Comments
 (0)