Skip to content

Commit 163bb94

Browse files
Fix wrong rounded corners when line numbers are displayed on code examples
1 parent 5b75f8a commit 163bb94

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,19 @@ ul.block, .block li {
749749
border-radius: 6px;
750750
}
751751

752+
/*
753+
If the code example line numbers are displayed, there will be a weird radius in the middle from
754+
both the code example and the line numbers, so we need to remove the radius in this case.
755+
*/
756+
.rustdoc .example-wrap > .example-line-numbers {
757+
border-top-right-radius: 0;
758+
border-bottom-right-radius: 0;
759+
}
760+
.rustdoc .example-wrap > .example-line-numbers + pre {
761+
border-top-left-radius: 0;
762+
border-bottom-left-radius: 0;
763+
}
764+
752765
/* For the last child of a div, the margin will be taken care of
753766
by the margin-top of the next item. */
754767
.rustdoc .example-wrap:last-child {

0 commit comments

Comments
 (0)