Skip to content

Commit 1e2ab99

Browse files
author
Tor Hovland
committed
Give import items their own CSS class.
1 parent 41f49aa commit 1e2ab99

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

src/librustdoc/html/render/print_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
296296

297297
write!(
298298
w,
299-
"<tr class=\"{stab}{add}module-item\">\
299+
"<tr class=\"{stab}{add}import-item\">\
300300
<td><code>{vis}{imp}</code></td>\
301301
<td class=\"docblock-short\">{stab_tags}</td>\
302302
</tr>",

src/librustdoc/html/static/rustdoc.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,8 @@ body.blur > :not(#help) {
868868
0 -1px 0 black;
869869
}
870870

871-
.module-item .stab {
871+
.module-item .stab,
872+
.import-item .stab {
872873
border-radius: 3px;
873874
display: inline-block;
874875
font-size: 80%;
@@ -879,7 +880,8 @@ body.blur > :not(#help) {
879880
vertical-align: text-bottom;
880881
}
881882

882-
.module-item.unstable {
883+
.module-item.unstable,
884+
.import-item.unstable {
883885
opacity: 0.65;
884886
}
885887

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ details.rustdoc-toggle > summary::before {
252252
color: #929292;
253253
}
254254

255-
.module-item .stab {
255+
.module-item .stab,
256+
.import-item .stab {
256257
color: #000;
257258
}
258259

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ details.rustdoc-toggle > summary::before {
217217
box-shadow: 0 0 8px 4px #078dd8;
218218
}
219219

220-
.module-item .stab {
220+
.module-item .stab,
221+
.import-item .stab {
221222
color: #ddd;
222223
}
223224

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ details.rustdoc-toggle > summary::before {
215215
box-shadow: 0 0 8px #078dd8;
216216
}
217217

218-
.module-item .stab {
218+
.module-item .stab,
219+
.import-item .stab {
219220
color: #000;
220221
}
221222

0 commit comments

Comments
 (0)