Skip to content

Commit debd22c

Browse files
committed
Bikeshed styling on code blocks in books a bit
This removes the margin before/after collapsible code blocks, so that collapse-normal-collapse mostly appears as one continuous block.
1 parent 03f70fb commit debd22c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/book/theme/css/general.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,17 @@ input.markers-summarize:checked ~ label.markers-summarize::before {
351351
flex-direction: column;
352352
}
353353

354-
/* details elements (not markers) */
355-
details.collapse-code {
354+
/* don't add margin between collapsed code elements and pre blocks */
355+
/* (this just removes all margin around pre, but that's generally fine) */
356+
.literate pre {
357+
margin: 0;
358+
}
359+
.literate cite.literate-source + * {
360+
/* a bit of margin against the cite element */
356361
margin-top: 0.125em;
357-
margin-bottom: 0.125em;
358362
}
359363

364+
/* details elements (not markers) */
360365
details.collapse-code > summary {
361366
width: 100%;
362367
cursor: pointer;

0 commit comments

Comments
 (0)