Skip to content

Commit 3a61ab6

Browse files
committed
rustdoc: clean up sidebar link CSS
Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
1 parent 24606de commit 3a61ab6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/librustdoc/html/static/css/rustdoc.css

+5-7
Original file line numberDiff line numberDiff line change
@@ -480,15 +480,11 @@ ul.block, .block li {
480480
list-style: none;
481481
}
482482

483-
.block a,
484-
.sidebar h2 a,
485-
.sidebar h3 a {
483+
.sidebar-elems a,
484+
.sidebar > h2 a {
486485
display: block;
487-
padding: 0.25rem;
486+
padding: 0.25rem; /* 4px */
488487
margin-left: -0.25rem;
489-
490-
text-overflow: ellipsis;
491-
overflow: hidden;
492488
}
493489

494490
.sidebar h2 {
@@ -522,6 +518,8 @@ ul.block, .block li {
522518

523519
.sidebar-elems .block li a {
524520
white-space: nowrap;
521+
text-overflow: ellipsis;
522+
overflow: hidden;
525523
}
526524

527525
.mobile-topbar {

0 commit comments

Comments
 (0)