Heading (top&bottom) spacing through CSS

@efemkay Thanks again! :pray:

It actually works! :partying_face: Marked your answer as the solution.

With either .cm-s-obsidian .HyperMD-header-3 or .cm-s-obsidian .HyperMD-header.HyperMD-header-3. I just had to use padding instead of margin. :man_facepalming:

To anybody else in this community, here is the snippet for controlling H3 appearance, including the vertical spacing (which is relevant to me to have better readability when I collapse them):

.cm-s-obsidian .HyperMD-header.HyperMD-header-3 { 
/*.cm-s-obsidian .HyperMD-header-3 { */
  font-family: var(--font-family-editor);
  font-weight: 500;
  font-size: var(--font-size-h3);
  color: var(--text-title-h3);
  padding: 14px 0 10px 0;
}

For future reference, my only question would be how could I find myself (if possible) such Obsidian specific CSS rules and their hierarchy :grey_question:

Thanks!

5 Likes