Problem with castom headers snippet

Things I have tried

What I’m trying to do

I want headers to be visually separated by each other. I tried to add a margin for each header.

h1, h2, h3, h4, h5, h6,
div.HyperMD-header.HyperMD-header-1.cm-line,
div.HyperMD-header.HyperMD-header-2.cm-line,
div.HyperMD-header.HyperMD-header-3.cm-line,
div.HyperMD-header.HyperMD-header-4.cm-line,
div.HyperMD-header.HyperMD-header-5.cm-line,
div.HyperMD-header.HyperMD-header-6.cm-line {
    margin-bottom: 10px!important;
    background: #266032;
}

The document has more then 40 headings of different levels.
The problem is with source mode and live preview mode:
I can’t select and edit the text on the last lines. And when I try to navigate with arrow keys on the keyboard it just skip these lines and go to the end of the document.
I think it sums part of this “margin-bottom: 10px” pixels end create an area on the bottom of the document. If i set “margin-bottom: 5px” it reduced by half.
It’s the same problem on windows and linux.
Obsidian version 1.0.0

we don’t take bug reports involving css. Moved to help. You can ask for help on discord too.

I think that it’s bug with editor mode problem, not css question.

@Rus dont use margin for adjusting height in editing view, use padding instead. Reading view is fine with margin.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.