From c756a9712af6a48edd1f611fcf2681f91e770049 Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Fri, 20 Nov 2026 06:39:12 +0800 Subject: [PATCH] fix: website factory render pass polish (0.4.7) Hero scrim, button and preset contrast and layout fixes found by the WO-096 render pass; see docs/adr. Co-Authored-By: Claude Fable 5.2 --- ...-show-and-the-frame-keeps-its-torn-edge.md | 20 ++++++++++++++++ presets.json | 24 +++++++++---------- templates/overrides/coffee/hero.ninjatpl | 4 ++-- templates/overrides/coffee/image.ninjatpl | 2 +- .../overrides/coffee/rich-section.ninjatpl | 2 +- 5 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 docs/adr/0003-the-hero-scrim-lets-the-photo-show-and-the-frame-keeps-its-torn-edge.md diff --git a/docs/adr/0003-the-hero-scrim-lets-the-photo-show-and-the-frame-keeps-its-torn-edge.md b/docs/adr/0003-the-hero-scrim-lets-the-photo-show-and-the-frame-keeps-its-torn-edge.md new file mode 100644 index 0000000..5a08632 --- /dev/null +++ b/docs/adr/0003-the-hero-scrim-lets-the-photo-show-and-the-frame-keeps-its-torn-edge.md @@ -0,0 +1,20 @@ +# The hero scrim lets the photo show, and the photo frame keeps its torn edge + +Decided 2026-11-20 for coffee 0.4.7, from the website factory's final render pass (orchestrator WO-096, ADR 0084). + +## Context + +The website factory compiles a customer's site onto this theme. The render pass screenshots every page at 1280 and 390 pixels and measures text over images and every button against what is behind it. + +## Decision + +- The light hero scrim is a radial gradient of the theme background centred on the hero text (at 35% across for the left-aligned hero): 84% at the centre, 80% out to 55% of the radius and 40% at the corners. The flat 82% scrim of the last release met contrast but washed the photo out; the text keeps the same backing while the photo reads at the edges. The render harness measures every text element over the photo (orchestrator WO-096). +- The photo frame of the rich section and the image block has 1.25rem of bottom padding. The torn-paper mask covers the bottom 13px of the frame, and with 0.5rem of padding it cut into the photo and left stray paper shapes under it. +- Every preset's primary, secondary, accent and destructive colour meets AA (4.5:1) with its foreground in both schemes. The render pass measures every button, and these pairs were under it: chalkboard dark destructive; chalkboard light accent; dark-roast dark destructive; dark-roast light accent; kraft-cream dark destructive; kraft-cream dark primary; kraft-cream light accent; matcha-oat dark destructive; matcha-oat light accent; morning-pour dark destructive; morning-pour light accent. Each colour moved the least lightness (at most ten points) that reaches 4.5 with its own foreground, and a colour that could not switched its foreground to white or near-black; a token that held the same colour (the ring) moved with it. The orchestrator's brand colour step keeps whatever contrast a preset has, so a preset under AA also left a branded site under it. + +## Consequences + +- coffee 0.4.7 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it. +- No schema field changes. + +Keywords: presets, AA, button contrast, primaryForeground, accentForeground, coffee, hero, overlayColor, scrim, radial-gradient, contrast, coffee-frame, coffee-torn-bottom, rich-section, image, WO-096, website factory, render pass diff --git a/presets.json b/presets.json index 0f863e3..6bc08ae 100644 --- a/presets.json +++ b/presets.json @@ -22,7 +22,7 @@ "secondaryForeground": "25 35% 18%", "muted": "32 20% 90%", "mutedForeground": "25 25% 32%", - "accent": "14 65% 50%", + "accent": "14 65% 45%", "accentForeground": "36 30% 96%", "destructive": "0 70% 45%", "destructiveForeground": "36 30% 96%", @@ -45,7 +45,7 @@ "mutedForeground": "32 18% 65%", "accent": "14 70% 60%", "accentForeground": "25 25% 12%", - "destructive": "0 65% 50%", + "destructive": "0 65% 48%", "destructiveForeground": "36 30% 92%", "border": "25 18% 26%", "input": "25 18% 24%", @@ -77,7 +77,7 @@ "muted": "32 20% 90%", "mutedForeground": "25 25% 32%", "accent": "14 80% 55%", - "accentForeground": "36 30% 96%", + "accentForeground": "0 0% 9%", "destructive": "0 70% 45%", "destructiveForeground": "36 30% 96%", "border": "30 20% 80%", @@ -99,7 +99,7 @@ "mutedForeground": "32 18% 70%", "accent": "14 80% 55%", "accentForeground": "20 18% 8%", - "destructive": "0 65% 50%", + "destructive": "0 65% 48%", "destructiveForeground": "36 30% 92%", "border": "20 18% 22%", "input": "20 18% 20%", @@ -130,7 +130,7 @@ "secondaryForeground": "22 40% 16%", "muted": "30 20% 86%", "mutedForeground": "22 25% 30%", - "accent": "8 65% 50%", + "accent": "8 65% 45%", "accentForeground": "32 35% 92%", "destructive": "0 70% 45%", "destructiveForeground": "32 35% 92%", @@ -145,7 +145,7 @@ "cardForeground": "32 28% 90%", "popover": "24 20% 18%", "popoverForeground": "32 28% 90%", - "primary": "16 50% 55%", + "primary": "16 50% 56%", "primaryForeground": "24 22% 14%", "secondary": "24 18% 24%", "secondaryForeground": "32 28% 90%", @@ -153,11 +153,11 @@ "mutedForeground": "30 16% 65%", "accent": "8 65% 60%", "accentForeground": "24 22% 14%", - "destructive": "0 65% 50%", + "destructive": "0 65% 47%", "destructiveForeground": "32 28% 90%", "border": "24 16% 28%", "input": "24 16% 26%", - "ring": "16 50% 55%" + "ring": "16 50% 56%" } } }, @@ -184,7 +184,7 @@ "secondaryForeground": "200 12% 16%", "muted": "40 14% 88%", "mutedForeground": "200 10% 34%", - "accent": "28 55% 48%", + "accent": "28 55% 40%", "accentForeground": "40 30% 96%", "destructive": "0 68% 46%", "destructiveForeground": "40 30% 96%", @@ -207,7 +207,7 @@ "mutedForeground": "40 18% 72%", "accent": "30 70% 62%", "accentForeground": "195 18% 12%", - "destructive": "0 62% 55%", + "destructive": "0 62% 49%", "destructiveForeground": "40 34% 92%", "border": "195 12% 24%", "input": "195 12% 22%", @@ -239,7 +239,7 @@ "muted": "80 16% 87%", "mutedForeground": "120 12% 34%", "accent": "36 60% 48%", - "accentForeground": "44 32% 94%", + "accentForeground": "0 0% 9%", "destructive": "0 68% 46%", "destructiveForeground": "44 32% 94%", "border": "90 14% 76%", @@ -261,7 +261,7 @@ "mutedForeground": "80 14% 68%", "accent": "38 72% 60%", "accentForeground": "130 16% 11%", - "destructive": "0 60% 55%", + "destructive": "0 60% 48%", "destructiveForeground": "44 30% 91%", "border": "130 10% 24%", "input": "130 10% 22%", diff --git a/templates/overrides/coffee/hero.ninjatpl b/templates/overrides/coffee/hero.ninjatpl index 5022104..d0942a2 100644 --- a/templates/overrides/coffee/hero.ninjatpl +++ b/templates/overrides/coffee/hero.ninjatpl @@ -11,7 +11,7 @@ {% set hasImage = backgroundImage %} {% set showOverlay = hasImage and overlayColor != "none" and overlayColor != "" %} {% macro herocontent(align) %} -{% if eyebrowText %}{{ eyebrowText }}{% endif %} +{% if eyebrowText %}{{ eyebrowText }}{% endif %} {% if headlineText %}

{{ headlineText }}

{% endif %} {% if subText %}

{{ subText }}

{% endif %} {% if descText %}

{{ descText }}

{% endif %} @@ -30,7 +30,7 @@ {% set align = "center" %} {% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
-{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}{% endif %} +{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}{% endif %}
{{ herocontent(align) }}
{% endif %} diff --git a/templates/overrides/coffee/image.ninjatpl b/templates/overrides/coffee/image.ninjatpl index c33b554..16f9f86 100644 --- a/templates/overrides/coffee/image.ninjatpl +++ b/templates/overrides/coffee/image.ninjatpl @@ -1,6 +1,6 @@ {% with size=size|default:"full" align=align|default:"center" %}
-
+
{% if src %}{% img src alt=alt class="block h-auto w-full rounded-sm object-cover" layout=size %}{% else %}
{% endif %}
{% if caption %}
{{ caption }}
{% endif %} diff --git a/templates/overrides/coffee/rich-section.ninjatpl b/templates/overrides/coffee/rich-section.ninjatpl index 09f7e12..c9e34ca 100644 --- a/templates/overrides/coffee/rich-section.ninjatpl +++ b/templates/overrides/coffee/rich-section.ninjatpl @@ -7,7 +7,7 @@ {% if ctaUrl and ctaLabel %}{{ ctaLabel }}{% endif %}
{% if media %}
-
{% img media alt=mediaAlt class="h-auto w-full rounded-sm object-cover" %}
+
{% img media alt=mediaAlt class="h-auto w-full rounded-sm object-cover" %}
{% endif %}