Heading spacing settings in Style Settings

I believe Minimal’s Heading spacing option only adjusts this:

--heading-spacing defines the spacing above a heading when it follows a paragraph (defaults to 2.5x paragraph spacing).

For directly under the headings, is seems you need work with the heading margin-bottom and paragraph top margin. Without using negative values (which you can do but probably shouldn’t), you could give this a try:

.markdown-rendered div:has( > :is(p,pre,table,ul,ol)) + div > :is(h1,h2,h3,h4,h5,h6) {
    margin-bottom: 5px;
}

.markdown-rendered p {
    margin-block-start: 0px;
}

Before:
Screenshot 2023-10-11 112312

After:

Screenshot 2023-10-11 112348

I haven’t checked every scenario with this, but you can always adjust it (or not use it) if you see any weirdness in other places. :smiley:

2 Likes