From 18cb4904f07454184c0f51d7002389c0d2b256f6 Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Mon, 31 Aug 2026 22:47:09 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=E2=99=BB=EF=B8=8F=EF=BC=9Adraw=20t?= =?UTF-8?q?he=20404=20action=20the=20way=20the=20site=20draws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bootstrap's button styles cost 10 KB to fill one rounded teal pill on one page, and the pill was the tell: this site draws in strokes. The ring is stroked rather than filled, a heading carries a rule beside it, a link carries an underline under it, and nothing anywhere is rounded. So the action is a square box with a 2px edge and no fill, labelled in the monospace uppercase the news chips use, with an arrow that slides back a little under the pointer the way the one on a post slides forward. Hovering or focusing it fills the box with ink and turns the label to parchment, which is the chip inverted. Both states read at 13.97:1. The wrapper sizes the ghosted numerals at 10rem, so the font size here is stated rather than inherited from it. `role='button'` went with the import. The element is a link that navigates, and saying otherwise told a screen reader to expect something that acts in place. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- _assets/styles/_error.scss | 55 +++++++++++++++++++++++++++++++++---- _assets/styles/main.scss | 1 - collections/_pages/404.html | 5 +++- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/_assets/styles/_error.scss b/_assets/styles/_error.scss index 39baa8421..a6cffe1fb 100644 --- a/_assets/styles/_error.scss +++ b/_assets/styles/_error.scss @@ -44,12 +44,55 @@ width: 100%; font-size: 10rem; transform: translateY(-50%); + } +} - .btn { - width: fit-content; - margin: 0 auto; - color: $secondary; - text-transform: uppercase; - } +/* The site draws in strokes: the ring is stroked rather than filled, a + heading carries a rule, a link carries an underline. So this is a box at + rest that fills only under the pointer, the way the news chips read. The + wrapper sets a 10rem font size for the ghosted numerals, so the size here + is stated rather than inherited. +*/ + +.error .error-home { + display: inline-flex; + gap: 0.5rem; + align-items: center; + align-self: center; + padding: 0.6875rem 1.25rem; + font-family: $font-family-monospace; + font-size: 0.75rem; + font-weight: 700; + line-height: 1; + color: $body-color; + text-transform: uppercase; + letter-spacing: 0.06em; + text-decoration: none; + background-color: transparent; + border: 2px solid $body-color; + transition: + color 0.15s ease, + background-color 0.15s ease; +} + +.error .error-home:hover, +.error .error-home:focus-visible { + color: $body-bg; + background-color: $body-color; +} + +.error .error-home-arrow { + display: inline-block; + transition: transform 0.15s ease; +} + +.error .error-home:hover .error-home-arrow { + transform: translateX(-3px); +} + +@media (prefers-reduced-motion: reduce) { + .error .error-home, + .error .error-home-arrow { + transition: none; } } diff --git a/_assets/styles/main.scss b/_assets/styles/main.scss index a1f478946..13a2c130e 100644 --- a/_assets/styles/main.scss +++ b/_assets/styles/main.scss @@ -15,7 +15,6 @@ @import '../../node_modules/bootstrap/scss/root'; // Layout & bespoke theme components. -@import '../../node_modules/bootstrap/scss/buttons'; @import '../../node_modules/bootstrap/scss/nav'; @import '../../node_modules/bootstrap/scss/navbar'; @import 'about'; diff --git a/collections/_pages/404.html b/collections/_pages/404.html index 8aa0e245b..7fe7cc74c 100644 --- a/collections/_pages/404.html +++ b/collections/_pages/404.html @@ -9,6 +9,9 @@

404