Skip to content

Commit fd2bdd4

Browse files
committed
fix spacing between child elements inside summary element
1 parent 1a7c15f commit fd2bdd4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

preview-src/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This is an example paragraph.
5151
[example]
5252
This is an example paragraph.
5353

54-
.Summary
54+
.Summary *Spoiler Alert!*
5555
[%collapsible]
5656
====
5757
Details.

src/css/doc.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ h1.page + aside.toc.embedded {
647647
}
648648

649649
.doc details > summary {
650-
display: flex;
650+
display: block;
651+
position: relative;
651652
line-height: var(--doc-line-height);
652653
margin-bottom: 0.5rem;
653654
}
@@ -658,8 +659,8 @@ h1.page + aside.toc.embedded {
658659
border-left-color: currentColor;
659660
border-width: 0.3em 0 0.3em 0.5em;
660661
position: absolute;
661-
margin-top: calc((var(--doc-line-height) * 0.5 - 0.3) * 1em);
662-
margin-left: -1.25rem;
662+
top: calc((var(--doc-line-height) * 0.5 - 0.3) * 1em);
663+
left: -1.25rem;
663664
transform: translateX(25%);
664665
}
665666

@@ -674,8 +675,8 @@ h1.page + aside.toc.embedded {
674675
width: 1.25rem;
675676
height: 1em;
676677
position: absolute;
677-
margin-top: calc((var(--doc-line-height) * 0.5 - 0.5) * 1em);
678-
margin-left: -1.25rem;
678+
top: calc((var(--doc-line-height) * 0.5 - 0.5) * 1em);
679+
left: -1.25rem;
679680
}
680681

681682
.doc details.result {

0 commit comments

Comments
 (0)