Skip to content

Commit 27ef382

Browse files
Improve positioning of "..." in collapsed impl block
1 parent 5943329 commit 27ef382

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ details.toggle:not([open]) > summary .docblock {
22002200
overflow-y: hidden;
22012201
}
22022202
details.toggle:not([open]) > summary .docblock > :first-child {
2203-
max-width: calc(100% - 1em);
2203+
max-width: 100%;
22042204
overflow: hidden;
22052205
width: fit-content;
22062206
white-space: nowrap;
@@ -2218,6 +2218,10 @@ details.toggle:not([open]) > summary .docblock > :first-child::after {
22182218
/* In case this ends up in a heading or a `<code>` item. */
22192219
font-weight: normal;
22202220
font: 1rem/1.5 "Source Serif 4", NanumBarunGothic, serif;
2221+
/* This is to make the "..." always appear at the bottom. */
2222+
padding-top: calc(1.5em + 0.75em - 1.2rem);
2223+
/* To make it look a bit better and not have it stuck to the preceding element. */
2224+
padding-left: 0.2em;
22212225
}
22222226
details.toggle > summary .docblock {
22232227
margin-top: 0.75em;

0 commit comments

Comments
 (0)