Skip to content

Commit

Permalink
Improve alias rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 12, 2018
1 parent cf9209f commit e81b59b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/main.js
Expand Up @@ -1273,7 +1273,7 @@
output += '<tr class="' + type + ' result"><td>' +
'<a href="' + item.href + '">' +
(item.is_alias === true ?
('<span><b>' + item.alias + ' </b></span><span ' +
('<span class="alias"><b>' + item.alias + ' </b></span><span ' +
'class="grey"><i>&nbsp;- see&nbsp;</i></span>') : '') +
item.displayPath + '<span class="' + type + '">' +
name + '</span></a></td><td>' +
Expand Down
4 changes: 0 additions & 4 deletions src/librustdoc/html/static/rustdoc.css
Expand Up @@ -1326,8 +1326,4 @@ kbd {
}
#all-types > p {
margin: 5px 0;
}

.search-results td span.grey {
color: #ccc;
}
9 changes: 8 additions & 1 deletion src/librustdoc/html/static/themes/dark.css
Expand Up @@ -382,7 +382,7 @@ kbd {
}

#theme-choices > button:hover, #theme-choices > button:focus {
background-color: #444;
background-color: #4e4e4e;
}

@media (max-width: 700px) {
Expand All @@ -397,3 +397,10 @@ kbd {
#all-types:hover {
background-color: #606060;
}

.search-results td span.alias {
color: #fff;
}
.search-results td span.grey {
color: #ccc;
}
7 changes: 7 additions & 0 deletions src/librustdoc/html/static/themes/light.css
Expand Up @@ -390,4 +390,11 @@ kbd {
}
#all-types:hover {
background-color: #f9f9f9;
}

.search-results td span.alias {
color: #000;
}
.search-results td span.grey {
color: #999;
}

0 comments on commit e81b59b

Please sign in to comment.