-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobsidian-gh-styles.css
More file actions
41 lines (35 loc) · 1.07 KB
/
obsidian-gh-styles.css
File metadata and controls
41 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* ============================================================ *
GitHub-style Markdown for Obsidian
Save as: <vault>/.obsidian/snippets/github-markdown.css
Enable in: Settings -> Appearance -> CSS snippets
Works on top of the Default theme (and most others).
* ============================================================ */
body {
/* --- Heading scale (the part flat themes drop) --- */
--h1-size: 2em;
--h2-size: 1.6em;
--h3-size: 1.4em;
--h4-size: 1.25em;
--h5-size: 1.1em;
--h6-size: 1em;
/* --- Horizontal rule (the `---` thematic break) --- */
--hr-thickness: 4px;
/* --- top padding above headers --- */
--p-spacing: 0.25rem;
}
/* Same underline + tighter top spacing in Live Preview (editing) */
.cm-s-obsidian .HyperMD-header-1,
.cm-s-obsidian .HyperMD-header-2 {
border-bottom: 1px solid var(--background-modifier-border);
}
/* Inline code and code blocks at GitHub's 85% size */
.markdown-rendered code,
.cm-s-obsidian .cm-inline-code {
font-size: 80%;
}
.theme-dark {
--code-background: #3e3e3e;
}
.theme-light {
--code-background: #e9e9e9;
}