fix: website factory render pass polish (0.5.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
6cd3245e22
commit
b1fa584c22
20
docs/adr/0004-the-hero-scrim-lets-the-photo-show.md
Normal file
20
docs/adr/0004-the-hero-scrim-lets-the-photo-show.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# The hero scrim lets the photo show
|
||||||
|
|
||||||
|
Decided 2026-11-20 for pastel-dream 0.5.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 berry-cream preset's primary (and ring) is 345 62% 49%, was 52%. Its white button text measured 4.497:1, a hair under AA, and the outline button's pink text over the hero photo 4.36:1.
|
||||||
|
- 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: berry-cream dark destructive; berry-cream light accent; berry-cream light destructive; lavender-honey dark destructive; lavender-honey light destructive; lavender-honey light primary; matcha-cream dark destructive; matcha-cream light primary; morning-haze dark destructive; morning-haze light destructive; morning-haze light primary; peach-blossom dark destructive; peach-blossom light primary. 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
|
||||||
|
|
||||||
|
- pastel-dream 0.5.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, pastel-dream, berry-cream, preset, primary, button contrast, hero, overlayColor, scrim, radial-gradient, contrast, WO-096, website factory, render pass
|
||||||
36
presets.json
36
presets.json
@ -16,7 +16,7 @@
|
|||||||
"cardForeground": "335 25% 22%",
|
"cardForeground": "335 25% 22%",
|
||||||
"popover": "30 42% 99%",
|
"popover": "30 42% 99%",
|
||||||
"popoverForeground": "335 25% 22%",
|
"popoverForeground": "335 25% 22%",
|
||||||
"primary": "340 58% 60%",
|
"primary": "340 58% 52%",
|
||||||
"primaryForeground": "40 50% 98%",
|
"primaryForeground": "40 50% 98%",
|
||||||
"secondary": "18 52% 92%",
|
"secondary": "18 52% 92%",
|
||||||
"secondaryForeground": "335 25% 24%",
|
"secondaryForeground": "335 25% 24%",
|
||||||
@ -24,11 +24,11 @@
|
|||||||
"mutedForeground": "335 12% 42%",
|
"mutedForeground": "335 12% 42%",
|
||||||
"accent": "160 38% 52%",
|
"accent": "160 38% 52%",
|
||||||
"accentForeground": "160 40% 12%",
|
"accentForeground": "160 40% 12%",
|
||||||
"destructive": "0 70% 55%",
|
"destructive": "0 70% 52%",
|
||||||
"destructiveForeground": "40 50% 98%",
|
"destructiveForeground": "40 50% 98%",
|
||||||
"border": "24 30% 87%",
|
"border": "24 30% 87%",
|
||||||
"input": "24 30% 87%",
|
"input": "24 30% 87%",
|
||||||
"ring": "340 58% 60%"
|
"ring": "340 58% 52%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "290 22% 12%",
|
"background": "290 22% 12%",
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"accent": "160 44% 60%",
|
"accent": "160 44% 60%",
|
||||||
"accentForeground": "290 30% 12%",
|
"accentForeground": "290 30% 12%",
|
||||||
"destructive": "0 60% 60%",
|
"destructive": "0 60% 60%",
|
||||||
"destructiveForeground": "320 22% 92%",
|
"destructiveForeground": "0 0% 9%",
|
||||||
"border": "290 16% 26%",
|
"border": "290 16% 26%",
|
||||||
"input": "290 16% 24%",
|
"input": "290 16% 24%",
|
||||||
"ring": "340 64% 72%"
|
"ring": "340 64% 72%"
|
||||||
@ -70,19 +70,19 @@
|
|||||||
"cardForeground": "345 30% 20%",
|
"cardForeground": "345 30% 20%",
|
||||||
"popover": "350 38% 99%",
|
"popover": "350 38% 99%",
|
||||||
"popoverForeground": "345 30% 20%",
|
"popoverForeground": "345 30% 20%",
|
||||||
"primary": "345 62% 52%",
|
"primary": "345 62% 49%",
|
||||||
"primaryForeground": "350 40% 98%",
|
"primaryForeground": "350 40% 98%",
|
||||||
"secondary": "350 46% 92%",
|
"secondary": "350 46% 92%",
|
||||||
"secondaryForeground": "345 30% 22%",
|
"secondaryForeground": "345 30% 22%",
|
||||||
"muted": "350 28% 93%",
|
"muted": "350 28% 93%",
|
||||||
"mutedForeground": "345 14% 40%",
|
"mutedForeground": "345 14% 40%",
|
||||||
"accent": "285 40% 55%",
|
"accent": "285 40% 58%",
|
||||||
"accentForeground": "285 40% 12%",
|
"accentForeground": "285 40% 12%",
|
||||||
"destructive": "0 72% 52%",
|
"destructive": "0 72% 51%",
|
||||||
"destructiveForeground": "350 40% 98%",
|
"destructiveForeground": "350 40% 98%",
|
||||||
"border": "348 28% 87%",
|
"border": "348 28% 87%",
|
||||||
"input": "348 28% 87%",
|
"input": "348 28% 87%",
|
||||||
"ring": "345 62% 52%"
|
"ring": "345 62% 49%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "330 24% 11%",
|
"background": "330 24% 11%",
|
||||||
@ -100,7 +100,7 @@
|
|||||||
"accent": "285 46% 66%",
|
"accent": "285 46% 66%",
|
||||||
"accentForeground": "330 30% 11%",
|
"accentForeground": "330 30% 11%",
|
||||||
"destructive": "0 62% 60%",
|
"destructive": "0 62% 60%",
|
||||||
"destructiveForeground": "340 22% 92%",
|
"destructiveForeground": "0 0% 9%",
|
||||||
"border": "330 16% 25%",
|
"border": "330 16% 25%",
|
||||||
"input": "330 16% 23%",
|
"input": "330 16% 23%",
|
||||||
"ring": "345 68% 66%"
|
"ring": "345 68% 66%"
|
||||||
@ -124,7 +124,7 @@
|
|||||||
"cardForeground": "150 22% 18%",
|
"cardForeground": "150 22% 18%",
|
||||||
"popover": "44 34% 99%",
|
"popover": "44 34% 99%",
|
||||||
"popoverForeground": "150 22% 18%",
|
"popoverForeground": "150 22% 18%",
|
||||||
"primary": "148 34% 42%",
|
"primary": "148 34% 37%",
|
||||||
"primaryForeground": "44 40% 98%",
|
"primaryForeground": "44 40% 98%",
|
||||||
"secondary": "150 30% 90%",
|
"secondary": "150 30% 90%",
|
||||||
"secondaryForeground": "150 22% 20%",
|
"secondaryForeground": "150 22% 20%",
|
||||||
@ -136,7 +136,7 @@
|
|||||||
"destructiveForeground": "44 40% 98%",
|
"destructiveForeground": "44 40% 98%",
|
||||||
"border": "90 18% 84%",
|
"border": "90 18% 84%",
|
||||||
"input": "90 18% 84%",
|
"input": "90 18% 84%",
|
||||||
"ring": "148 34% 42%"
|
"ring": "148 34% 37%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "275 20% 12%",
|
"background": "275 20% 12%",
|
||||||
@ -154,7 +154,7 @@
|
|||||||
"accent": "28 74% 62%",
|
"accent": "28 74% 62%",
|
||||||
"accentForeground": "275 30% 12%",
|
"accentForeground": "275 30% 12%",
|
||||||
"destructive": "0 60% 60%",
|
"destructive": "0 60% 60%",
|
||||||
"destructiveForeground": "44 26% 91%",
|
"destructiveForeground": "0 0% 9%",
|
||||||
"border": "275 14% 26%",
|
"border": "275 14% 26%",
|
||||||
"input": "275 14% 24%",
|
"input": "275 14% 24%",
|
||||||
"ring": "148 40% 58%"
|
"ring": "148 40% 58%"
|
||||||
@ -178,7 +178,7 @@
|
|||||||
"cardForeground": "270 24% 22%",
|
"cardForeground": "270 24% 22%",
|
||||||
"popover": "40 38% 99%",
|
"popover": "40 38% 99%",
|
||||||
"popoverForeground": "270 24% 22%",
|
"popoverForeground": "270 24% 22%",
|
||||||
"primary": "265 44% 58%",
|
"primary": "265 44% 56%",
|
||||||
"primaryForeground": "40 50% 98%",
|
"primaryForeground": "40 50% 98%",
|
||||||
"secondary": "265 38% 92%",
|
"secondary": "265 38% 92%",
|
||||||
"secondaryForeground": "270 24% 24%",
|
"secondaryForeground": "270 24% 24%",
|
||||||
@ -186,11 +186,11 @@
|
|||||||
"mutedForeground": "270 12% 42%",
|
"mutedForeground": "270 12% 42%",
|
||||||
"accent": "42 78% 56%",
|
"accent": "42 78% 56%",
|
||||||
"accentForeground": "42 60% 12%",
|
"accentForeground": "42 60% 12%",
|
||||||
"destructive": "0 70% 55%",
|
"destructive": "0 70% 52%",
|
||||||
"destructiveForeground": "40 50% 98%",
|
"destructiveForeground": "40 50% 98%",
|
||||||
"border": "265 24% 87%",
|
"border": "265 24% 87%",
|
||||||
"input": "265 24% 87%",
|
"input": "265 24% 87%",
|
||||||
"ring": "265 44% 58%"
|
"ring": "265 44% 56%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "270 26% 12%",
|
"background": "270 26% 12%",
|
||||||
@ -208,7 +208,7 @@
|
|||||||
"accent": "42 80% 62%",
|
"accent": "42 80% 62%",
|
||||||
"accentForeground": "270 30% 12%",
|
"accentForeground": "270 30% 12%",
|
||||||
"destructive": "0 60% 60%",
|
"destructive": "0 60% 60%",
|
||||||
"destructiveForeground": "265 20% 92%",
|
"destructiveForeground": "0 0% 9%",
|
||||||
"border": "270 16% 26%",
|
"border": "270 16% 26%",
|
||||||
"input": "270 16% 24%",
|
"input": "270 16% 24%",
|
||||||
"ring": "265 54% 72%"
|
"ring": "265 54% 72%"
|
||||||
@ -233,7 +233,7 @@
|
|||||||
"popover": "26 46% 99%",
|
"popover": "26 46% 99%",
|
||||||
"popoverForeground": "15 30% 22%",
|
"popoverForeground": "15 30% 22%",
|
||||||
"primary": "16 68% 56%",
|
"primary": "16 68% 56%",
|
||||||
"primaryForeground": "26 50% 98%",
|
"primaryForeground": "0 0% 9%",
|
||||||
"secondary": "14 58% 92%",
|
"secondary": "14 58% 92%",
|
||||||
"secondaryForeground": "15 30% 24%",
|
"secondaryForeground": "15 30% 24%",
|
||||||
"muted": "26 34% 93%",
|
"muted": "26 34% 93%",
|
||||||
@ -262,7 +262,7 @@
|
|||||||
"accent": "340 60% 68%",
|
"accent": "340 60% 68%",
|
||||||
"accentForeground": "300 30% 12%",
|
"accentForeground": "300 30% 12%",
|
||||||
"destructive": "0 60% 60%",
|
"destructive": "0 60% 60%",
|
||||||
"destructiveForeground": "26 26% 91%",
|
"destructiveForeground": "0 0% 9%",
|
||||||
"border": "300 15% 26%",
|
"border": "300 15% 26%",
|
||||||
"input": "300 15% 24%",
|
"input": "300 15% 24%",
|
||||||
"ring": "16 74% 64%"
|
"ring": "16 74% 64%"
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
{% set align = "center" %}
|
{% set align = "center" %}
|
||||||
{% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
|
{% 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 %}">
|
<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>
|
<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>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user