Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5c707df

Browse files
committedDec 2, 2024
Use text ellipsis instead of bottom blurring
1 parent c6d81bb commit 5c707df

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed
 

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

+16-11
Original file line numberDiff line numberDiff line change
@@ -2214,20 +2214,25 @@ details.toggle:not([open]) > summary .docblock {
22142214
max-height: calc(1.5em + 0.75em);
22152215
overflow-y: hidden;
22162216
}
2217-
details.toggle:not([open]) > summary .docblock::after {
2218-
content: '';
2217+
details.toggle:not([open]) > summary .docblock > :first-child {
2218+
max-width: calc(100% - 1em);
2219+
overflow: hidden;
2220+
width: fit-content;
2221+
white-space: nowrap;
2222+
position: relative;
2223+
padding-right: 1em;
2224+
}
2225+
details.toggle:not([open]) > summary .docblock > :first-child::after {
2226+
content: "…";
22192227
position: absolute;
2220-
bottom: 0;
2221-
left: 0;
22222228
right: 0;
2223-
pointer-events: none;
2224-
background: linear-gradient(
2225-
to top,
2226-
var(--scrape-example-code-wrapper-background-start),
2227-
var(--scrape-example-code-wrapper-background-end)
2228-
);
2229-
height: 0.7em;
2229+
top: 0;
2230+
bottom: 0;
22302231
z-index: 1;
2232+
background-color: var(--main-background-color);
2233+
/* In case this ends up in a heading or a `<code>` item. */
2234+
font-weight: normal;
2235+
font: 1rem/1.5 "Source Serif 4", NanumBarunGothic, serif;
22312236
}
22322237
details.toggle > summary .docblock {
22332238
margin-top: 0.75em;

0 commit comments

Comments
 (0)
Failed to load comments.