Skip to content

Commit 4d745c2

Browse files
committed
rustdoc: Tweak list style
1 parent 34392ad commit 4d745c2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/rust.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,9 @@ td {
101101
#TOC ul {
102102
list-style: none;
103103
padding-left: 0px;
104+
}
105+
106+
/* Adjust list alignment so rustdoc indexes don't align with blockquotes */
107+
div.index ul {
108+
padding-left: 1em;
104109
}

src/librustdoc/markdown_pass.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ fn write_index(ctxt: &Ctxt, index: doc::Index) {
436436
return;
437437
}
438438
439+
ctxt.w.put_line(~"<div class='index'>");
440+
ctxt.w.put_line(~"");
441+
439442
for index.entries.each |entry| {
440443
let header = header_text_(entry.kind, entry.name);
441444
let id = copy entry.link;
@@ -447,6 +450,8 @@ fn write_index(ctxt: &Ctxt, index: doc::Index) {
447450
}
448451
}
449452
ctxt.w.put_line(~"");
453+
ctxt.w.put_line(~"</div>");
454+
ctxt.w.put_line(~"");
450455
}
451456
452457
#[test]

0 commit comments

Comments
 (0)