blog.git

blog

~ Personal research notes. blog.sqzer.com
git clone https://github.com/debuman/blog.git
commit 540215720a4ae0693a1b20a3af9f6ad9c2c631e5
parent ed5883878a7eb2b53db6df22c3c5c9291f5e6560
Author: sqzer <110329244+sqzer-x@users.noreply.github.com>
Date: Thu, 24 Sep 2026 12:50:49 +0900

fix: stack the Older/Newer title under its label on narrow screens

Below 36rem the footer nav collapses to a single track, but the title
kept grid-column: 2. It landed in an implicit max-content column, the
1fr track shrank to nothing and the label was painted over the start
of the title: 24 of 58 links at 320px, 8 at 375px, still 2 at 480px.

The title now moves to column 1 inside the container query, under the
label. Widths of 768px and up are unchanged. The hit-area note beside
the card is re-measured for the stacked layout.

Diffstat:
Msrc/pages/writing/[year]/[slug].astro | 10+++++++---
1 file changed, 7 insertion(+), 3 deletion(-)

diff --git a/src/pages/writing/[year]/[slug].astro b/src/pages/writing/[year]/[slug].astro
@@ -1941,9 +1941,9 @@ const ld = {
      exactly where `text-underline-offset: 0.14em` had it. The rule does not move; it gains
      the motion and the crimson. :focus-visible is on the <a>, which is the card, so the
      keyboard sees the same mark the pointer does.
-     Hit area re-measured after the wrapper went in: the card is still 1024 x 61 at 1700
-     and 328 x 82.66 on a wrapped title at 375, and all four corners and the centre still
-     hit-test to the link. */
+     Hit area, measured on every post from 320 to 1700: the card is 1024 x 61 at 1700 and
+     328 wide at 375, where the title sits under the label and the card is 79-105px tall
+     depending on how the title wraps. All four corners and the centre hit-test to the link. */
   .adj__item:focus-visible .adj__title { color: var(--crimson); }
   @media (hover: hover) {
     .adj__item:hover .adj__title { color: var(--crimson); }
@@ -1978,5 +1978,9 @@ const ld = {
     .post__head { display: flex; flex-direction: column; align-items: flex-start; }
     .post__kicker { order: -2; }
     .adj__label { justify-self: start; margin-block-end: 0.25rem; }
+    /* Back onto the one track, under the label. Left at column 2, the title lands in an
+       implicit max-content column, the 1fr track shrinks to nothing and the label is
+       painted over the start of the title. */
+    .adj__title { grid-column: 1; }
   }
 </style>