Skip to content

Rename "Important traits" to "Notable traits" #75344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3450,7 +3450,7 @@ fn spotlight_decl(decl: &clean::FnDecl) -> String {
if impl_.trait_.def_id().map_or(false, |d| c.traits[&d].is_spotlight) {
if out.is_empty() {
out.push_str(&format!(
"<h3 class=\"important\">Important traits for {}</h3>\
"<h3 class=\"notable\">Notable traits for {}</h3>\
<code class=\"content\">",
impl_.for_.print()
));
Expand Down Expand Up @@ -3485,7 +3485,7 @@ fn spotlight_decl(decl: &clean::FnDecl) -> String {
if !out.is_empty() {
out.insert_str(
0,
"<span class=\"important-traits\"><span class=\"important-traits-tooltip\">ⓘ<div class='important-traits-tooltiptext'><span class=\"docblock\">"
"<span class=\"notable-traits\"><span class=\"notable-traits-tooltip\">ⓘ<div class='notable-traits-tooltiptext'><span class=\"docblock\">"

);
out.push_str("</code></span></div></span></span>");
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2636,9 +2636,9 @@ function defocusSearchBar() {
});
}());

onEachLazy(document.getElementsByClassName("important-traits"), function(e) {
onEachLazy(document.getElementsByClassName("notable-traits"), function(e) {
e.onclick = function() {
this.getElementsByClassName('important-traits-tooltiptext')[0]
this.getElementsByClassName('notable-traits-tooltiptext')[0]
.classList.toggle("force-tooltip");
};
});
Expand Down
28 changes: 14 additions & 14 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ h2 {
h3 {
font-size: 1.3em;
}
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important),
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),
h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
font-weight: 500;
margin: 20px 0 15px 0;
Expand Down Expand Up @@ -528,7 +528,7 @@ h4 > code, h3 > code, .invisible > code {
font-size: 0.8em;
}

.content .methods > div:not(.important-traits) {
.content .methods > div:not(.notable-traits) {
margin-left: 40px;
margin-bottom: 15px;
}
Expand Down Expand Up @@ -1099,17 +1099,17 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
font-size: 20px;
}

.important-traits-tooltip {
.notable-traits-tooltip {
display: inline-block;
cursor: pointer;
}

.important-traits:hover .important-traits-tooltiptext,
.important-traits .important-traits-tooltiptext.force-tooltip {
.notable-traits:hover .notable-traits-tooltiptext,
.notable-traits .notable-traits-tooltiptext.force-tooltip {
display: inline-block;
}

.important-traits .important-traits-tooltiptext {
.notable-traits .notable-traits-tooltiptext {
display: none;
padding: 5px 3px 3px 3px;
border-radius: 6px;
Expand All @@ -1121,18 +1121,18 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
border: 1px solid;
}

.important-traits-tooltip::after {
.notable-traits-tooltip::after {
/* The margin on the tooltip does not capture hover events,
this extends the area of hover enough so that mouse hover is not
lost when moving the mouse to the tooltip */
content: "\00a0\00a0\00a0";
}

.important-traits .important, .important-traits .docblock {
.notable-traits .notable, .notable-traits .docblock {
margin: 0;
}

.important-traits .docblock code.content{
.notable-traits .docblock code.content{
margin: 0;
padding: 0;
font-size: 20px;
Expand Down Expand Up @@ -1183,13 +1183,13 @@ pre.rust {
font-size: 16px;
}

.important-traits {
.notable-traits {
cursor: pointer;
z-index: 2;
margin-left: 5px;
}

h4 > .important-traits {
h4 > .notable-traits {
position: absolute;
left: -44px;
top: 2px;
Expand Down Expand Up @@ -1431,7 +1431,7 @@ h4 > .important-traits {
z-index: 1;
}

h4 > .important-traits {
h4 > .notable-traits {
position: absolute;
left: -22px;
top: 24px;
Expand Down Expand Up @@ -1522,7 +1522,7 @@ h4 > .important-traits {
margin-top: 0;
}

.important-traits .important-traits-tooltiptext {
.notable-traits .notable-traits-tooltiptext {
left: 0;
top: 100%;
}
Expand All @@ -1544,7 +1544,7 @@ h4 > .important-traits {
}
}

h3.important {
h3.notable {
margin: 0;
margin-bottom: 13px;
font-size: 19px;
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/themes/ayu.css
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
border-color: transparent #314559 transparent transparent;
}

.important-traits-tooltiptext {
.notable-traits-tooltiptext {
background-color: #314559;
border-color: #5c6773;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
border-color: transparent black transparent transparent;
}

.important-traits-tooltiptext {
.notable-traits-tooltiptext {
background-color: #111;
border-color: #777;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
border-color: transparent black transparent transparent;
}

.important-traits-tooltiptext {
.notable-traits-tooltiptext {
background-color: #eee;
border-color: #999;
}
Expand Down