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 <noreply@anthropic.com>
This commit is contained in:
parent
3177ea635a
commit
c756a9712a
@ -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
|
||||
24
presets.json
24
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%",
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
{% set hasImage = backgroundImage %}
|
||||
{% set showOverlay = hasImage and overlayColor != "none" and overlayColor != "" %}
|
||||
{% macro herocontent(align) %}
|
||||
{% if eyebrowText %}<span class="coffee-hand mb-2 inline-block text-2xl text-accent">{{ eyebrowText }}</span>{% endif %}
|
||||
{% if eyebrowText %}<span class="coffee-hand mb-2 inline-block text-2xl {% if hasImage %}text-primary{% else %}text-accent{% endif %}">{{ eyebrowText }}</span>{% endif %}
|
||||
{% if headlineText %}<h1 class="coffee-display text-4xl leading-tight text-primary sm:text-5xl lg:text-6xl">{{ headlineText }}</h1>{% endif %}
|
||||
{% if subText %}<h2 class="coffee-body mt-4 max-w-2xl text-xl text-muted-foreground sm:text-2xl{% if align == "center" %} mx-auto{% endif %}">{{ subText }}</h2>{% endif %}
|
||||
{% if descText %}<p class="coffee-body mt-4 max-w-xl leading-relaxed text-muted-foreground{% if align == "center" %} mx-auto{% endif %}">{{ descText }}</p>{% endif %}
|
||||
@ -30,7 +30,7 @@
|
||||
{% set align = "center" %}
|
||||
{% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
|
||||
<section class="hero relative flex flex-col overflow-hidden bg-background text-foreground {% if minHeight == "screen" %}min-h-screen{% elif minHeight == "50vh" %}min-h-[50vh]{% elif minHeight == "auto" %}min-h-[400px]{% else %}min-h-[75vh]{% endif %} {% if verticalAlign == "top" %}justify-start pt-20{% elif verticalAlign == "bottom" %}justify-end pb-20{% else %}justify-center{% endif %}{% if class %} {{ class }}{% endif %}">
|
||||
{% if hasImage %}<div class="absolute inset-0 z-0">{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}<div{% if overlayColor == "light" %} style="background: hsl(var(--background) / 0.82);"{% endif %} class="absolute inset-0 {% if overlayColor == "light" %}{% elif overlayColor == "primary" %}bg-primary/50{% elif overlayOpacity <= 30 %}bg-black/30{% elif overlayOpacity <= 50 %}bg-black/50{% elif overlayOpacity <= 70 %}bg-black/70{% else %}bg-black/80{% endif %}"></div>{% endif %}</div>{% endif %}
|
||||
{% if hasImage %}<div class="absolute inset-0 z-0">{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}<div{% if overlayColor == "light" %} style="background: radial-gradient(ellipse at {% if variant == "left-aligned" %}35%{% else %}50%{% endif %} 50%, hsl(var(--background) / 0.86) 0%, hsl(var(--background) / 0.8) 50%, hsl(var(--background) / 0.2) 100%);"{% endif %} class="absolute inset-0 {% if overlayColor == "light" %}{% elif overlayColor == "primary" %}bg-primary/50{% elif overlayOpacity <= 30 %}bg-black/30{% elif overlayOpacity <= 50 %}bg-black/50{% elif overlayOpacity <= 70 %}bg-black/70{% else %}bg-black/80{% endif %}"></div>{% endif %}</div>{% endif %}
|
||||
<div class="relative z-10 mx-auto w-full max-w-4xl px-4 sm:px-6 lg:px-8 {% if variant == "left-aligned" %}text-left{% else %}text-center{% endif %}">{{ herocontent(align) }}</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{% with size=size|default:"full" align=align|default:"center" %}
|
||||
<figure class="my-8 flex flex-1 flex-col {% if align == "left" %}items-start{% elif align == "right" %}items-end{% else %}items-center{% endif %}{% if class %} {{ class }}{% endif %}">
|
||||
<div class="coffee-frame coffee-torn-bottom relative overflow-hidden p-2 {% if size == "xs" %}max-w-[200px] w-full{% elif size == "sm" %}max-w-[400px] w-full{% elif size == "md" %}max-w-[600px] w-full{% elif size == "lg" %}max-w-[800px] w-full{% else %}w-full{% endif %}">
|
||||
<div class="coffee-frame coffee-torn-bottom relative overflow-hidden p-2 pb-5 {% if size == "xs" %}max-w-[200px] w-full{% elif size == "sm" %}max-w-[400px] w-full{% elif size == "md" %}max-w-[600px] w-full{% elif size == "lg" %}max-w-[800px] w-full{% else %}w-full{% endif %}">
|
||||
{% if src %}{% img src alt=alt class="block h-auto w-full rounded-sm object-cover" layout=size %}{% else %}<div class="flex h-48 w-full items-center justify-center bg-secondary text-primary/20"><svg width="48" height="48" class="h-12 w-12" aria-hidden="true"><use href="/icons/lucide.svg#image"></use></svg></div>{% endif %}
|
||||
</div>
|
||||
{% if caption %}<figcaption class="coffee-hand mt-3 text-center text-xl text-accent">{{ caption }}</figcaption>{% endif %}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
{% if ctaUrl and ctaLabel %}<a href="{{ ctaUrl }}" class="kraft-tag mt-6 text-base px-5 py-3">{{ ctaLabel }}<svg width="16" height="16" class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#arrow-right"></use></svg></a>{% endif %}
|
||||
</div>
|
||||
{% if media %}<div class="{% if mediaPosition == "left" %}md:order-1{% else %}md:order-2{% endif %}">
|
||||
<div class="coffee-frame coffee-torn-bottom overflow-hidden rounded-sm p-2">{% img media alt=mediaAlt class="h-auto w-full rounded-sm object-cover" %}</div>
|
||||
<div class="coffee-frame coffee-torn-bottom overflow-hidden rounded-sm p-2 pb-5">{% img media alt=mediaAlt class="h-auto w-full rounded-sm object-cover" %}</div>
|
||||
</div>{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user