Skip to content

Commit 38bf289

Browse files
Improve paddings for code blocks line numbers
1 parent 660210c commit 38bf289

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,14 @@ both the code example and the line numbers, so we need to remove the radius in t
831831
-webkit-user-select: none;
832832
user-select: none;
833833
padding: 14px 8px;
834+
padding-right: 2px;
834835
color: var(--src-line-numbers-span-color);
835836
}
836837

837-
.rustdoc .scraped-example .src-line-numbers {
838+
.rustdoc .scraped-example .example-wrap .src-line-numbers {
839+
padding: 0;
840+
}
841+
.rustdoc .src-line-numbers pre {
838842
padding: 14px 0;
839843
}
840844
.src-line-numbers a, .src-line-numbers span {
@@ -893,7 +897,7 @@ both the code example and the line numbers, so we need to remove the radius in t
893897
}
894898

895899
.docblock code, .docblock-short code,
896-
pre, .rustdoc.src .example-wrap {
900+
pre, .rustdoc.src .example-wrap, .example-wrap .src-line-numbers {
897901
background-color: var(--code-block-background-color);
898902
}
899903

0 commit comments

Comments
 (0)