Skip to content

Commit 3f0fee5

Browse files
Merge pull request #288 from jonathanhefner/more_less-contain-summary
Contain more-less `<summary>` inside `<details>`
2 parents c5a3294 + b0b64e0 commit 3f0fee5

File tree

1 file changed

+6
-8
lines changed
  • lib/rdoc/generator/template/rails/resources/css

1 file changed

+6
-8
lines changed

lib/rdoc/generator/template/rails/resources/css/main.css

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,19 +599,22 @@ html {
599599
*/
600600

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

606607
details.more-less > ul {
607-
margin-top: 0;
608+
margin-top: var(--space-sm);
608609
}
609610

610611
details.more-less summary {
611612
position: absolute;
612-
padding-left: 0.25em;
613+
bottom: 0;
614+
613615
font-weight: bold;
614616
color: var(--icon-color);
617+
padding-left: 0.25em;
615618
}
616619

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

631634
details.more-less summary::before {
632-
font-size: 1.15em;
633635
content: "+";
634636
}
635637

636-
details.more-less[open] summary {
637-
top: calc(100% + var(--space-sm));
638-
}
639-
640638
details.more-less[open] summary::before {
641639
content: "-";
642640
}

0 commit comments

Comments
 (0)