Files
obsidian-global-config/snippets/text-normalize.css

112 lines
3.0 KiB
CSS

/* Minimal -- heading overrides */
body {
--h1-size: 18px;
--h1-weight: 600;
--h2-size: 18px;
--h2-weight: 600;
--h3-size: 18px;
--h3-weight: 600;
--h4-size: 18px;
--h4-weight: 600;
--h5-size: 18px;
--h5-weight: 600;
--h6-size: 18px;
--h6-weight: 600;
--h6-variant: normal;
}
/* ---------- 1. one face everywhere ---------- */
body {
--my-mono: "iA Writer Mono S", "JetBrains Mono", "Berkeley Mono", var(--font-monospace-default);
/* Minimal's theme-level vars, skip the interface */
--font-text-theme: var(--my-mono);
--font-monospace-theme: var(--my-mono);
/* Obsidian core vars */
--font-text: var(--my-mono);
--font-monospace: var(--my-mono);
--h1-font: var(--my-mono);
--h2-font: var(--my-mono);
--h3-font: var(--my-mono);
--h4-font: var(--my-mono);
--h5-font: var(--my-mono);
--h6-font: var(--my-mono);
/* put code on the same grid as body text */
--code-size: var(--font-text-size);
}
/* ---------- 2. kill what breaks the grid ---------- */
.markdown-rendered :is(h1, h2, h3, h4, h5, h6),
.inline-title,
.cm-s-obsidian .HyperMD-header,
.cm-s-obsidian :is(.cm-header-1, .cm-header-2, .cm-header-3,
.cm-header-4, .cm-header-5, .cm-header-6),
.callout-title-inner,
.table-view-table,
code, pre, .cm-line, .metadata-property-value {
font-family: var(--my-mono) !important;
letter-spacing: 0 !important;
word-spacing: 0 !important;
font-variant: normal !important;
font-kerning: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0, "clig" 0, "calt" 0, "kern" 0;
font-synthesis: none;
text-rendering: optimizeSpeed;
}
/* Footnotes */
/* Reference marker, both views */
a.footnote-link,
.cm-s-obsidian span.cm-footref.cm-hmd-barelink,
.cm-s-obsidian span.cm-footref.cm-hmd-barelink.cm-formatting {
font-family: var(--my-mono) !important;
font-size: inherit !important;
letter-spacing: 0 !important;
}
/* The <sup> wrapper does the raising, not the <a> */
.markdown-rendered sup {
vertical-align: baseline !important;
font-size: inherit !important;
line-height: inherit !important;
}
/* Footnote text, both views */
.footnotes,
.footnotes p,
.footnotes li,
.cm-s-obsidian .cm-line.HyperMD-footnote {
font-family: var(--my-mono) !important;
font-size: var(--font-text-size) !important;
line-height: var(--line-height-normal);
letter-spacing: 0 !important;
}
/* List numbers -- ::marker accepts font properties */
.footnotes ol > li::marker {
font-family: var(--my-mono);
font-size: var(--font-text-size);
}
/* catch-all: normalize every descendant span,
without touching size (which would flatten headings) */
.markdown-source-view.mod-cm6 .cm-line,
.markdown-source-view.mod-cm6 .cm-line *,
.markdown-rendered,
.markdown-rendered * {
font-family: var(--my-mono) !important;
letter-spacing: 0 !important;
word-spacing: 0 !important;
font-kerning: none !important;
font-variant-ligatures: none !important;
font-feature-settings: "liga" 0, "clig" 0, "calt" 0, "kern" 0 !important;
font-synthesis: none !important;
}