Skip to content

Commit

Permalink
Merge pull request #288 from jonathanhefner/more_less-contain-summary
Browse files Browse the repository at this point in the history
Contain more-less `<summary>` inside `<details>`
  • Loading branch information
jonathanhefner authored Aug 28, 2023
2 parents c5a3294 + b0b64e0 commit 3f0fee5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/rdoc/generator/template/rails/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -599,19 +599,22 @@ html {
*/

details.more-less {
margin-top: var(--space-sm);
margin-top: 0;
padding-bottom: calc(var(--line-height) * 1em + var(--space-sm));
position: relative;
}

details.more-less > ul {
margin-top: 0;
margin-top: var(--space-sm);
}

details.more-less summary {
position: absolute;
padding-left: 0.25em;
bottom: 0;

font-weight: bold;
color: var(--icon-color);
padding-left: 0.25em;
}

@media (hover: hover) {
Expand All @@ -629,14 +632,9 @@ details.more-less summary::-webkit-details-marker {
}

details.more-less summary::before {
font-size: 1.15em;
content: "+";
}

details.more-less[open] summary {
top: calc(100% + var(--space-sm));
}

details.more-less[open] summary::before {
content: "-";
}
Expand Down

0 comments on commit 3f0fee5

Please sign in to comment.