Skip to content

Commit 5afe8df

Browse files
Use text ellipsis instead of bottom blurring
1 parent ee19497 commit 5afe8df

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
@@ -2199,20 +2199,25 @@ details.toggle:not([open]) > summary .docblock {
21992199
max-height: calc(1.5em + 0.75em);
22002200
overflow-y: hidden;
22012201
}
2202-
details.toggle:not([open]) > summary .docblock::after {
2203-
content: '';
2202+
details.toggle:not([open]) > summary .docblock > :first-child {
2203+
max-width: calc(100% - 1em);
2204+
overflow: hidden;
2205+
width: fit-content;
2206+
white-space: nowrap;
2207+
position: relative;
2208+
padding-right: 1em;
2209+
}
2210+
details.toggle:not([open]) > summary .docblock > :first-child::after {
2211+
content: "…";
22042212
position: absolute;
2205-
bottom: 0;
2206-
left: 0;
22072213
right: 0;
2208-
pointer-events: none;
2209-
background: linear-gradient(
2210-
to top,
2211-
var(--scrape-example-code-wrapper-background-start),
2212-
var(--scrape-example-code-wrapper-background-end)
2213-
);
2214-
height: 0.7em;
2214+
top: 0;
2215+
bottom: 0;
22152216
z-index: 1;
2217+
background-color: var(--main-background-color);
2218+
/* In case this ends up in a heading or a `<code>` item. */
2219+
font-weight: normal;
2220+
font: 1rem/1.5 "Source Serif 4", NanumBarunGothic, serif;
22162221
}
22172222
details.toggle > summary .docblock {
22182223
margin-top: 0.75em;

0 commit comments

Comments
 (0)