Skip to content

Commit f3cc957

Browse files
committed
Rename "Important traits" to "Notable traits"
* Rename it in the UI * Rename the CSS classes
1 parent 543f03d commit f3cc957

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

src/librustdoc/html/render/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3450,7 +3450,7 @@ fn spotlight_decl(decl: &clean::FnDecl) -> String {
34503450
if impl_.trait_.def_id().map_or(false, |d| c.traits[&d].is_spotlight) {
34513451
if out.is_empty() {
34523452
out.push_str(&format!(
3453-
"<h3 class=\"important\">Important traits for {}</h3>\
3453+
"<h3 class=\"notable\">Notable traits for {}</h3>\
34543454
<code class=\"content\">",
34553455
impl_.for_.print()
34563456
));
@@ -3485,7 +3485,7 @@ fn spotlight_decl(decl: &clean::FnDecl) -> String {
34853485
if !out.is_empty() {
34863486
out.insert_str(
34873487
0,
3488-
"<span class=\"important-traits\"><span class=\"important-traits-tooltip\">ⓘ<div class='important-traits-tooltiptext'><span class=\"docblock\">"
3488+
"<span class=\"notable-traits\"><span class=\"notable-traits-tooltip\">ⓘ<div class='notable-traits-tooltiptext'><span class=\"docblock\">"
34893489

34903490
);
34913491
out.push_str("</code></span></div></span></span>");

src/librustdoc/html/static/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2636,9 +2636,9 @@ function defocusSearchBar() {
26362636
});
26372637
}());
26382638

2639-
onEachLazy(document.getElementsByClassName("important-traits"), function(e) {
2639+
onEachLazy(document.getElementsByClassName("notable-traits"), function(e) {
26402640
e.onclick = function() {
2641-
this.getElementsByClassName('important-traits-tooltiptext')[0]
2641+
this.getElementsByClassName('notable-traits-tooltiptext')[0]
26422642
.classList.toggle("force-tooltip");
26432643
};
26442644
});

src/librustdoc/html/static/rustdoc.css

+14-14
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ h2 {
9191
h3 {
9292
font-size: 1.3em;
9393
}
94-
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important),
94+
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),
9595
h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
9696
font-weight: 500;
9797
margin: 20px 0 15px 0;
@@ -528,7 +528,7 @@ h4 > code, h3 > code, .invisible > code {
528528
font-size: 0.8em;
529529
}
530530

531-
.content .methods > div:not(.important-traits) {
531+
.content .methods > div:not(.notable-traits) {
532532
margin-left: 40px;
533533
margin-bottom: 15px;
534534
}
@@ -1099,17 +1099,17 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
10991099
font-size: 20px;
11001100
}
11011101

1102-
.important-traits-tooltip {
1102+
.notable-traits-tooltip {
11031103
display: inline-block;
11041104
cursor: pointer;
11051105
}
11061106

1107-
.important-traits:hover .important-traits-tooltiptext,
1108-
.important-traits .important-traits-tooltiptext.force-tooltip {
1107+
.notable-traits:hover .notable-traits-tooltiptext,
1108+
.notable-traits .notable-traits-tooltiptext.force-tooltip {
11091109
display: inline-block;
11101110
}
11111111

1112-
.important-traits .important-traits-tooltiptext {
1112+
.notable-traits .notable-traits-tooltiptext {
11131113
display: none;
11141114
padding: 5px 3px 3px 3px;
11151115
border-radius: 6px;
@@ -1121,18 +1121,18 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
11211121
border: 1px solid;
11221122
}
11231123

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

1131-
.important-traits .important, .important-traits .docblock {
1131+
.notable-traits .notable, .notable-traits .docblock {
11321132
margin: 0;
11331133
}
11341134

1135-
.important-traits .docblock code.content{
1135+
.notable-traits .docblock code.content{
11361136
margin: 0;
11371137
padding: 0;
11381138
font-size: 20px;
@@ -1183,13 +1183,13 @@ pre.rust {
11831183
font-size: 16px;
11841184
}
11851185

1186-
.important-traits {
1186+
.notable-traits {
11871187
cursor: pointer;
11881188
z-index: 2;
11891189
margin-left: 5px;
11901190
}
11911191

1192-
h4 > .important-traits {
1192+
h4 > .notable-traits {
11931193
position: absolute;
11941194
left: -44px;
11951195
top: 2px;
@@ -1431,7 +1431,7 @@ h4 > .important-traits {
14311431
z-index: 1;
14321432
}
14331433

1434-
h4 > .important-traits {
1434+
h4 > .notable-traits {
14351435
position: absolute;
14361436
left: -22px;
14371437
top: 24px;
@@ -1522,7 +1522,7 @@ h4 > .important-traits {
15221522
margin-top: 0;
15231523
}
15241524

1525-
.important-traits .important-traits-tooltiptext {
1525+
.notable-traits .notable-traits-tooltiptext {
15261526
left: 0;
15271527
top: 100%;
15281528
}
@@ -1544,7 +1544,7 @@ h4 > .important-traits {
15441544
}
15451545
}
15461546

1547-
h3.important {
1547+
h3.notable {
15481548
margin: 0;
15491549
margin-bottom: 13px;
15501550
font-size: 19px;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
389389
border-color: transparent #314559 transparent transparent;
390390
}
391391

392-
.important-traits-tooltiptext {
392+
.notable-traits-tooltiptext {
393393
background-color: #314559;
394394
border-color: #5c6773;
395395
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
339339
border-color: transparent black transparent transparent;
340340
}
341341

342-
.important-traits-tooltiptext {
342+
.notable-traits-tooltiptext {
343343
background-color: #111;
344344
border-color: #777;
345345
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
333333
border-color: transparent black transparent transparent;
334334
}
335335

336-
.important-traits-tooltiptext {
336+
.notable-traits-tooltiptext {
337337
background-color: #eee;
338338
border-color: #999;
339339
}

0 commit comments

Comments
 (0)