Skip to content

Commit

Permalink
Use text ellipsis instead of bottom blurring
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 29, 2024
1 parent 391c707 commit 1cc40fa
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -2187,20 +2187,22 @@ details.toggle:not([open]) > summary .docblock {
max-height: calc(1.5em + 0.75em);
overflow-y: hidden;
}
details.toggle:not([open]) > summary .docblock::after {
content: '';
details.toggle:not([open]) > summary .docblock > :first-child {
max-width: calc(100% - 1em);
overflow: hidden;
width: fit-content;
white-space: nowrap;
position: relative;
padding-right: 1em;
}
details.toggle:not([open]) > summary .docblock > :first-child::after {
content: "…";
position: absolute;
bottom: 0;
left: 0;
right: 0;
pointer-events: none;
background: linear-gradient(
to top,
var(--scrape-example-code-wrapper-background-start),
var(--scrape-example-code-wrapper-background-end)
);
height: 0.7em;
top: 0;
bottom: 0;
z-index: 1;
background-color: var(--main-background-color);
}
details.toggle > summary .docblock {
margin-top: 0.75em;
Expand Down

0 comments on commit 1cc40fa

Please sign in to comment.