Summary Files Commits Branches @commit @diff @stats
path: root / src / styles.css
diff options
context:
space:
mode:
Commite64767eb771daee6b930d0b7f151f0bc7d3b6e4e (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-07-10 22:25:42 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-07-10 22:25:42 +0300
Files744e2aaaaea3f0eeb65bb28aaf4d0ddd35514bb0 /src/styles.css
syndamia.com-e64767eb771daee6b930d0b7f151f0bc7d3b6e4e.tar
syndamia.com-e64767eb771daee6b930d0b7f151f0bc7d3b6e4e.tar.gz
syndamia.com-e64767eb771daee6b930d0b7f151f0bc7d3b6e4e.zip
Parentff2af4895d4549c84b56e7ee06274bc9323fafc6 (diff)
(styles) Improved header anchor sizes match headers more closely
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 {