Summary Files Commits Branches @commit @diff @stats
path: root / src / styles.css
diff options
context:
space:
mode:
1 files changed, 4 insertions, 4 deletions
-rw-r--r--src/styles.css8
diff --git a/src/styles.css b/src/styles.css
index fe890b6..94c6f8b 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -195,11 +195,11 @@ h1, h2, h3, h4, h5, h6 {
h1 { display: block; font-size: 1.7em; margin-block-end: 0.5em; }
h2 { margin-top: 2.5em; }
h3 { margin-top: 2em; }
-
+ h1 + *, h1 ~ h1 { margin-top: 0; }
.h-anchor { color: var(--fg-color); border: none; }
- h1 + *, h1 ~ h1, h2 + a + *, h3 + a + *, h4 + a + *, h5 + a + *, h6 + a + * {
- margin-top: 0;
- }
+ /* Slightly smaller than browser defaults https://stackoverflow.com/a/70720104/12036073 */
+ h2 ~ .h-anchor { font-size: 1.4em; }
+ h3 ~ .h-anchor { font-size: 1.1em; }
/* The following CSS is a modified version of sindresorhus's github-markdown-css repo: https://github.com/sindresorhus/github-markdown-css */
code, pre {