94 lines
3.2 KiB
CSS
94 lines
3.2 KiB
CSS
/* ============================================================
|
|
Minimal — monospace grid
|
|
Save to .obsidian/snippets/ and enable in
|
|
Settings → Appearance → CSS snippets
|
|
============================================================ */
|
|
|
|
/* ---- 1. Font + size variables ------------------------------ */
|
|
body {
|
|
--my-mono: "iA Writer Mono V", "JetBrains Mono", "Berkeley Mono", var(--font-monospace-default);
|
|
|
|
--font-text-theme: var(--my-mono);
|
|
--font-monospace-theme: var(--my-mono);
|
|
--font-text: var(--my-mono);
|
|
--font-monospace: var(--my-mono);
|
|
|
|
--code-size: var(--font-text-size);
|
|
|
|
--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;
|
|
|
|
--h1-variant: normal; --h2-variant: normal; --h3-variant: normal;
|
|
--h4-variant: normal; --h5-variant: normal; --h6-variant: normal;
|
|
|
|
--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);
|
|
}
|
|
|
|
/* ---- 2. Heading colors -------------------------------------
|
|
Must be body.colorful-headings (0,1,1) to beat Minimal's own
|
|
rule. Delete this block if colorful headings is off. */
|
|
body.colorful-headings {
|
|
--h1-color: var(--color-purple);
|
|
--h2-color: var(--color-purple);
|
|
--h3-color: var(--color-purple);
|
|
--h4-color: var(--color-purple);
|
|
--h5-color: var(--color-purple);
|
|
--h6-color: var(--color-purple);
|
|
}
|
|
|
|
/* ---- 3. Catch-all: family + metrics, NEVER size ------------- */
|
|
.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-variant: normal !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;
|
|
text-rendering: optimizeSpeed;
|
|
}
|
|
|
|
/* ---- 4. Footnotes: force size back to the grid -------------
|
|
Scoped so it can't touch headings. This is the piece the
|
|
catch-all could not do. */
|
|
.cm-s-obsidian .cm-line.HyperMD-footnote,
|
|
.cm-s-obsidian .cm-line.HyperMD-footnote *,
|
|
.cm-s-obsidian span.cm-footref,
|
|
.cm-s-obsidian span.cm-footref.cm-hmd-barelink,
|
|
.cm-s-obsidian span.cm-footref.cm-hmd-barelink.cm-formatting,
|
|
.markdown-rendered .footnotes,
|
|
.markdown-rendered .footnotes *,
|
|
.markdown-rendered sup,
|
|
.markdown-rendered sub,
|
|
.markdown-rendered a.footnote-link {
|
|
font-size: var(--font-text-size) !important;
|
|
line-height: var(--line-height-normal) !important;
|
|
vertical-align: baseline !important;
|
|
}
|
|
|
|
.markdown-rendered .footnotes ol > li::marker {
|
|
font-family: var(--my-mono);
|
|
font-size: var(--font-text-size);
|
|
}
|
|
|
|
/* ---- 5. Code blocks flush with body text ------------------- */
|
|
.markdown-rendered pre,
|
|
.markdown-rendered pre > code {
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
}
|
|
.markdown-source-view.mod-cm6 .HyperMD-codeblock {
|
|
padding-left: 0 !important;
|
|
padding-right: 0 !important;
|
|
}
|