Skip to content

Commit 6e7ead0

Browse files
committed
Remove stability marker arrow.
This was originally introduced in # 51387, to solve a UI problem: in a list of collapsed methods, it was not clear whether the stability marker attached to the item above it or the one below it. That problem has now been solved in a couple of different ways: - The margin between the stability marker and the item it annotates is much smaller, indicating their relationship. - Stability markers are now collapsed along with the docblock. Also, the arrow made our CSS fragile, since it was positioned absolutely and needed to line up horizontally with the beginning of the item (or with the link icon). Aligning this with the rest of the docblock makes getting the CSS right a lot easier.
1 parent 64e1038 commit 6e7ead0

File tree

5 files changed

+3
-17
lines changed

5 files changed

+3
-17
lines changed

src/librustdoc/html/static/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -863,10 +863,10 @@ function hideThemeButtonState() {
863863
});
864864

865865
onEachLazy(document.getElementsByTagName("summary"), function(el) {
866-
el.addEventListener("click", function(ev) {
866+
el.addEventListener("click", function() {
867867
addClass(el, "used");
868868
});
869-
})
869+
});
870870

871871
onEachLazy(document.getElementsByTagName("a"), function(el) {
872872
// For clicks on internal links (<A> tags with a hash property), we expand the section we're

src/librustdoc/html/static/rustdoc.css

+1-9
Original file line numberDiff line numberDiff line change
@@ -580,22 +580,14 @@ nav.sub {
580580

581581
.content .item-info {
582582
position: relative;
583-
margin-left: 33px;
583+
margin-left: 24px; /* same as .docblock */
584584
margin-top: -13px;
585585
}
586586

587587
.sub-variant > div > .item-info {
588588
margin-top: initial;
589589
}
590590

591-
.content .item-info::before {
592-
content: '⬑';
593-
font-size: 25px;
594-
position: absolute;
595-
top: -6px;
596-
left: -19px;
597-
}
598-
599591
.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant,
600592
.impl-items > .associatedtype, .content .impl-items details > summary > .type,
601593
.impl-items details > summary > .associatedconstant,

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

-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ pre, .rustdoc.source .example-wrap {
165165
color: #c5c5c5;
166166
}
167167

168-
.content .item-info::before { color: #ccc; }
169-
170168
.content span.foreigntype, .content a.foreigntype { color: #ef57ff; }
171169
.content span.union, .content a.union { color: #98a01c; }
172170
.content span.constant, .content a.constant,

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

-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ a.result-static:focus { background-color: #0063cc; }
138138
a.result-primitive:focus { background-color: #00708a; }
139139
a.result-keyword:focus { background-color: #884719; }
140140

141-
.content .item-info::before { color: #ccc; }
142-
143141
.content span.enum, .content a.enum, .block a.current.enum { color: #82b089; }
144142
.content span.struct, .content a.struct, .block a.current.struct { color: #2dbfb8; }
145143
.content span.type, .content a.type, .block a.current.type { color: #ff7f00; }

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

-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ a.result-static:focus { background-color: #c3e0ff; }
136136
a.result-primitive:focus { background-color: #9aecff; }
137137
a.result-keyword:focus { background-color: #f99650; }
138138

139-
.content .item-info::before { color: #ccc; }
140-
141139
.content span.enum, .content a.enum, .block a.current.enum { color: #508157; }
142140
.content span.struct, .content a.struct, .block a.current.struct { color: #ad448e; }
143141
.content span.type, .content a.type, .block a.current.type { color: #ba5d00; }

0 commit comments

Comments
 (0)