Skip to content

Commit e005d04

Browse files
authored
Rollup merge of #105086 - notriddle:notriddle/sidebar-css, r=GuillaumeGomez
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.
2 parents 6c4b5a2 + 3a61ab6 commit e005d04

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: 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)