Skip to content

Commit 6df16f3

Browse files
authored
Merge pull request #1234 from DirectXMan12/docs/book-css-tweaks
📖 Bikeshed styling on code blocks in books a bit
2 parents eace08d + debd22c commit 6df16f3

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)