Friends and fellow folders — I bring magic from CSS wizard @sailKite in the form of a snippet they have graciously provided at my humble request!
/* Put some vertical space under folded headings for better readbility.
Courtesy of @sailkite https://discord.com/channels/686053708261228577/702656734631821413/1136455149691347045
Re: feature request https://forum.obsidian.md/t/when-folding-dont-include-trailing-empty-lines/43973
"and of course you can do it a different way where instead you modify the top padding on things that come after
"which may have relevance in some cases but i'm struggling to think of any off the top of my head... maybe in embeds or something"
For a rough version of this different way see https://forum.obsidian.md/t/when-folding-dont-include-trailing-empty-lines/43973/10
*/
.is-collapsed > :is(h1, h2, h3, h4, h5, h6),
.HyperMD-header:has(> .cm-fold-indicator.is-collapsed, > .cm-foldPlaceholder) {
padding-bottom: 24px;
}
It doesn’t preserve your literal blank lines but it adds some padding under folded headings for much the same effect.