Does anyone know how to make the underline of the title always white and not the color of the title

make the underline of the title always white and not the color of the title

make the underline of the title always white and not the color of the title

What theme are u using? That would help others to help u. Normally header note width underline is done using ::after. E.g. in reading view, it would be

h2::after {
    color: white;
}

I use blue topaz

this snippet would override blue topaz header border color.

save the following code into a text file as a .css file. any name is fine (i.e. bt-header-border-color.css). place it in [yourvault]/.obsidian/snippets folder

body.h1-toggle-underline :is(.markdown-preview-view,.markdown-rendered) h1,
body.h1-toggle-underline .markdown-source-view.is-live-preview .HyperMD-header.HyperMD-header-1.cm-line {
    border-color: white;
}

body.h2-toggle-underline :is(.markdown-preview-view,.markdown-rendered) h2,
body.h2-toggle-underline .markdown-source-view.is-live-preview .HyperMD-header.HyperMD-header-2.cm-line {
    border-color: white;
}

body.h3-toggle-underline :is(.markdown-preview-view,.markdown-rendered) h3,
body.h3-toggle-underline .markdown-source-view.is-live-preview .HyperMD-header.HyperMD-header-3.cm-line {
    border-color: white;
}

body.h4-toggle-underline :is(.markdown-preview-view,.markdown-rendered) h4,
body.h4-toggle-underline .markdown-source-view.is-live-preview .HyperMD-header.HyperMD-header-4.cm-line {
    border-color: white;
}

body.h5-toggle-underline :is(.markdown-preview-view,.markdown-rendered) h5,
body.h5-toggle-underline .markdown-source-view.is-live-preview .HyperMD-header.HyperMD-header-5.cm-line {
    border-color: white;
}

body.h6-toggle-underline :is(.markdown-preview-view,.markdown-rendered) h6,
body.h6-toggle-underline .markdown-source-view.is-live-preview .HyperMD-header.HyperMD-header-6.cm-line {
    border-color: white;
}
1 Like

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