~aasg/haunted-blog

38c77d7881c4a400e581a171ca650d28d0e7bc88 — Aluísio Augusto Silva Gonçalves 3 months ago 6668731
css: Unfix the header bar from the viewport

Fixing its interaction with direct section links, and how the fix
interacts with links in the paragraph before a heading, wasn't worth
the total effort that would be spent on it.  Maybe if I someday add one
of those reading trackers for long-form articles (of which I have none)
I'll revisit this.
1 files changed, 4 insertions(+), 8 deletions(-)

M static/css/site.css
M static/css/site.css => static/css/site.css +4 -8
@@ 52,7 52,7 @@

/* Apply the same special style of `body > nav`. */
body > header > nav {
  position: fixed;
  position: absolute;
  top: 0;
  left: 0;
}


@@ 125,10 125,7 @@ footer p {
  text-align: end;
}

/* Pad section headings so they don't go under the header bar.
 *
 * Based on a suggestion from Patrick Strietzel at
 * https://css-tricks.com/hash-tag-links-padding/ */
/* Trim padding surrounding the section headings. */
/* TODO: this could really benefit from :matches/:is */
h1:not(.p-name),
h2:not(.p-name),


@@ 136,9 133,8 @@ h3:not(.p-name),
h4:not(.p-name),
h5:not(.p-name),
h6:not(.p-name) {
  display: inline-block;
  margin-top: -4rem;
  padding-top: 4rem;
  margin: 0;
  padding: 0.3em 0 0;
}

/* Remove all padding from the article title. */