@aluminumbird figured this out here: Further help with line spacing in Edit Mode - Help - Obsidian Forum
I do like having spaces around the headers (and I wanted to remove spaces in code blocks) so modified the version as follows:
.CodeMirror pre.CodeMirror-line{
padding-bottom: 15px;
}
.cm-s-obsidian pre.HyperMD-list-line {
padding-bottom: 0px !important;
}
.cm-s-obsidian pre.HyperMD-header{
/*padding-bottom: 15px !important; */
padding-top: 15px;
}
.cm-s-obsidian .HyperMD-codeblock {
padding-bottom: 0px !important;
}