Can't find the cause for H4 appearing larger than H3 in source mode

I’ve been banging my head agains the desk trying to find the cause of this. Any help is much appreciated.

.cm-s-obsidian pre.HyperMD-header.HyperMD-header-3 seems to be overriding the font-size (that rule is more specific so it wins).

We’ll adjust it to be less specific in the coming version, for now please add !important to your font-size rule, which should fix it.

1 Like

Thanks @Silver! I noticed that in the code and tried erasing it from the source tab in the inspector, but didn’t notice any difference. Perhaps I was too sleepy at the time.

Actually, still couldn’t get it to work.

I think you need a space before the !important part. Try that please?

No change :confused:

So, I noticed that if I change the sizes to px they work as expected, with em they do not.

Ah, that’s why, I forgot you were using relative font sizes. I’m afraid you’d need to use px instead of em, or add the following:

.cm-s-obsidian pre.HyperMD-header.HyperMD-header-1,
.cm-s-obsidian pre.HyperMD-header.HyperMD-header-2,
.cm-s-obsidian pre.HyperMD-header.HyperMD-header-3 {
	font-size: inherit;
}

Again, it will be fixed in 0.7.5, but you can use the above solution as a temporary workaround.

1 Like

No worries. Just glad it works :wink:

1 Like