Summary Files Commits Branches @commit @diff @stats
path: root / src / styles.css
diff options
context:
space:
mode:
1 files changed, 3 insertions, 1 deletions
-rw-r--r--src/styles.css4
diff --git a/src/styles.css b/src/styles.css
index a8fd245..498af65 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -195,7 +195,9 @@ 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; }
+ h1 + *, h1 ~ h1, h2 + a + *, h3 + a + *, h4 + a + *, h5 + a + *, h6 + a + * {
+ margin-top: 0;
+ }
.h-anchor { color: var(--fg-color); border: none; }
/* Slightly smaller than browser defaults https://stackoverflow.com/a/70720104/12036073 */
h2 + .h-anchor { font-size: 1.4em; }