Need help with CCS Themes

I have already adapted a css template to my needs. It’s kinda complicated, because CMD
SHIFT+i does not work on my Mac. So I googled and found this helpful page to get an idea of the basic structure: obsidian-css-snippets/Headers.md at master · Dmitriy-Shulha/obsidian-css-snippets · GitHub

But still, I need help with these customizations:

  1. I would like to underline all Headings (similar like logseq does). How would I do it for both (editor and preview) modes?
  2. The formatting of the editor and markdown preview differ. The fontsize seems smaller in the editor. How can I adjust the formatting to the same font-size, padding, margins, etc.?
  3. Where do I find the “default.css” so I can adjust ist?

Thanks in advance

Solved the 1st question:

The tags I was looking for, were:

  • .cm-header-1
  • .markdown-preview-view h1

Examples:


/* Underline H1 heading in Edit mode */
.cm-header-1 {
  border-bottom: 1px solid var(--text-faint);
}
.cm-header-2 {
  border-bottom: 1px solid var(--text-faint);
}

/* ==========headings======= */
/* Underline = border-bottom */
.markdown-preview-view h1 {
  border-bottom: 1px solid var(--text-faint);
}
.markdown-preview-view h2 {
  border-bottom: 1px solid var(--text-faint);
}

Looking for the developer tools?

You need CMD OPT i (or CMD ALT i), rather than CMD SHIFT i.

Or from the menu bar, choose View > Toggle Developer Tools.

Angel

1 Like

Thank you. This solves most of my questions.

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