Am I missing something? Iād really want to control the spacing of these headings in reading mode, whether expanded (by default) or collapsed. Iāll keep looking for an answer meanwhile ā¦
@efemkay Thanks for the feedback!
Sorry to reply that late, but I expected to get an email when a reply appears. Thatās not happenning by default, so I updated the notification preferences meanwhile.
and enabled this in Settings > Appearance > CSS Snippets, but unfortunately no changes.
I tried also to have this included in the theme file, still no changes.
Any other ideas, please
Speaking about understanding , how can I find all these CSS rules that are being used in Obsidian
I used to use Typora before, and that had the option to enable DevTools and then you get all those relevants insights (same as you can do in VSCode). In such cases itās easy to discover how the presentation works.
It actually works! 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.
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):
btw, yeah i forgot that somehow in editing view, you would want to avoid setting the margin. set instead the padding. i donāt really know why but that always been advise from obsidian theme developers.
Just for posterity why itās a bad idea to use margins instead of paddings, from Licat, for editing view:
āThe editor measures and predicts where elements are located on the page so that when you scroll around, parts of the page thatās out of view can be removed to keep the editor performant. Using margins completely breaks the ability for the editor to do that because margins donāt behave predictably due to the margin collapse algorithmā
@efemkay Thanks for the refs!
And yes, meanwhile, I found that the so popular shortcut Ctrl/Cmd+Shift+I works in Obsidian as well. Thus, I managed to have a pretty perfect setup to my taste.