fix: website factory render pass polish (0.5.6)
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
f4039a7f80
commit
fda9838c50
20
docs/adr/0003-the-hero-scrim-lets-the-photo-show.md
Normal file
20
docs/adr/0003-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 cyberpunk 0.5.6, 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).
|
||||||
|
- 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: acid-rain light accent; acid-rain light destructive; ghost-protocol light accent; hotline light accent; hotline light destructive; hotline light primary; neon-noir light destructive; neon-noir light primary; toxic-bloom light accent; toxic-bloom light destructive. 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.
|
||||||
|
- The outline button of the hero draws its label in the foreground colour. The accent label (neon cyan) measured 1.7:1 on the light scheme.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
- cyberpunk 0.5.6 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it.
|
||||||
|
- No schema field changes.
|
||||||
|
|
||||||
|
Keywords: outline button, presets, AA, button contrast, primaryForeground, accentForeground, cyberpunk, hero, overlayColor, scrim, radial-gradient, contrast, WO-096, website factory, render pass
|
||||||
24
presets.json
24
presets.json
@ -17,7 +17,7 @@
|
|||||||
"cardForeground": "260 25% 10%",
|
"cardForeground": "260 25% 10%",
|
||||||
"popover": "240 10% 99%",
|
"popover": "240 10% 99%",
|
||||||
"popoverForeground": "260 25% 10%",
|
"popoverForeground": "260 25% 10%",
|
||||||
"primary": "320 100% 50%",
|
"primary": "320 100% 44%",
|
||||||
"primaryForeground": "0 0% 100%",
|
"primaryForeground": "0 0% 100%",
|
||||||
"secondary": "260 20% 92%",
|
"secondary": "260 20% 92%",
|
||||||
"secondaryForeground": "260 25% 10%",
|
"secondaryForeground": "260 25% 10%",
|
||||||
@ -25,11 +25,11 @@
|
|||||||
"mutedForeground": "260 12% 40%",
|
"mutedForeground": "260 12% 40%",
|
||||||
"accent": "185 100% 45%",
|
"accent": "185 100% 45%",
|
||||||
"accentForeground": "260 25% 10%",
|
"accentForeground": "260 25% 10%",
|
||||||
"destructive": "0 90% 55%",
|
"destructive": "0 90% 48%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "260 20% 88%",
|
"border": "260 20% 88%",
|
||||||
"input": "260 20% 88%",
|
"input": "260 20% 88%",
|
||||||
"ring": "320 100% 50%"
|
"ring": "320 100% 44%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "260 18% 6%",
|
"background": "260 18% 6%",
|
||||||
@ -78,9 +78,9 @@
|
|||||||
"secondaryForeground": "220 30% 10%",
|
"secondaryForeground": "220 30% 10%",
|
||||||
"muted": "200 20% 95%",
|
"muted": "200 20% 95%",
|
||||||
"mutedForeground": "220 15% 40%",
|
"mutedForeground": "220 15% 40%",
|
||||||
"accent": "320 95% 55%",
|
"accent": "320 95% 45%",
|
||||||
"accentForeground": "0 0% 100%",
|
"accentForeground": "0 0% 100%",
|
||||||
"destructive": "0 90% 55%",
|
"destructive": "0 90% 48%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "200 25% 88%",
|
"border": "200 25% 88%",
|
||||||
"input": "200 25% 88%",
|
"input": "200 25% 88%",
|
||||||
@ -134,8 +134,8 @@
|
|||||||
"muted": "100 12% 95%",
|
"muted": "100 12% 95%",
|
||||||
"mutedForeground": "120 12% 40%",
|
"mutedForeground": "120 12% 40%",
|
||||||
"accent": "320 100% 55%",
|
"accent": "320 100% 55%",
|
||||||
"accentForeground": "0 0% 100%",
|
"accentForeground": "0 0% 9%",
|
||||||
"destructive": "0 90% 55%",
|
"destructive": "0 90% 48%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "100 15% 88%",
|
"border": "100 15% 88%",
|
||||||
"input": "100 15% 88%",
|
"input": "100 15% 88%",
|
||||||
@ -182,19 +182,19 @@
|
|||||||
"cardForeground": "300 30% 12%",
|
"cardForeground": "300 30% 12%",
|
||||||
"popover": "30 35% 99%",
|
"popover": "30 35% 99%",
|
||||||
"popoverForeground": "300 30% 12%",
|
"popoverForeground": "300 30% 12%",
|
||||||
"primary": "330 95% 55%",
|
"primary": "330 95% 46%",
|
||||||
"primaryForeground": "0 0% 100%",
|
"primaryForeground": "0 0% 100%",
|
||||||
"secondary": "30 35% 92%",
|
"secondary": "30 35% 92%",
|
||||||
"secondaryForeground": "300 30% 12%",
|
"secondaryForeground": "300 30% 12%",
|
||||||
"muted": "30 25% 94%",
|
"muted": "30 25% 94%",
|
||||||
"mutedForeground": "300 15% 40%",
|
"mutedForeground": "300 15% 40%",
|
||||||
"accent": "170 85% 40%",
|
"accent": "170 85% 40%",
|
||||||
"accentForeground": "0 0% 100%",
|
"accentForeground": "0 0% 9%",
|
||||||
"destructive": "0 90% 55%",
|
"destructive": "0 90% 48%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "30 30% 87%",
|
"border": "30 30% 87%",
|
||||||
"input": "30 30% 87%",
|
"input": "30 30% 87%",
|
||||||
"ring": "330 95% 55%"
|
"ring": "330 95% 46%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "285 35% 7%",
|
"background": "285 35% 7%",
|
||||||
@ -244,7 +244,7 @@
|
|||||||
"muted": "0 0% 94%",
|
"muted": "0 0% 94%",
|
||||||
"mutedForeground": "0 0% 38%",
|
"mutedForeground": "0 0% 38%",
|
||||||
"accent": "160 90% 38%",
|
"accent": "160 90% 38%",
|
||||||
"accentForeground": "0 0% 100%",
|
"accentForeground": "0 0% 9%",
|
||||||
"destructive": "0 85% 50%",
|
"destructive": "0 85% 50%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "0 0% 86%",
|
"border": "0 0% 86%",
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
{% if descText %}<p class="mt-4 max-w-xl leading-relaxed text-muted-foreground{% if align == "center" %} mx-auto{% endif %}">{{ descText }}</p>{% endif %}
|
{% if descText %}<p class="mt-4 max-w-xl leading-relaxed text-muted-foreground{% if align == "center" %} mx-auto{% endif %}">{{ descText }}</p>{% endif %}
|
||||||
{% if pText or sText %}<div class="mt-8 flex flex-col sm:flex-row gap-4{% if align == "center" %} justify-center{% endif %}">
|
{% if pText or sText %}<div class="mt-8 flex flex-col sm:flex-row gap-4{% if align == "center" %} justify-center{% endif %}">
|
||||||
{% if pText and pUrl %}<a href="{{ pUrl }}" class="cyberpunk-mono clip-cut rgb-split inline-flex items-center justify-center gap-2 rounded-md bg-primary px-6 py-3 font-semibold uppercase tracking-wider text-primary-foreground transition-opacity hover:opacity-90">{{ pText }}</a>{% endif %}
|
{% if pText and pUrl %}<a href="{{ pUrl }}" class="cyberpunk-mono clip-cut rgb-split inline-flex items-center justify-center gap-2 rounded-md bg-primary px-6 py-3 font-semibold uppercase tracking-wider text-primary-foreground transition-opacity hover:opacity-90">{{ pText }}</a>{% endif %}
|
||||||
{% if sText and sUrl %}<a href="{{ sUrl }}" class="cyberpunk-mono inline-flex items-center justify-center rounded-md border border-accent/60 px-6 py-3 font-semibold uppercase tracking-wider text-accent transition-colors hover:bg-accent/10">{{ sText }}</a>{% endif %}
|
{% if sText and sUrl %}<a href="{{ sUrl }}" class="cyberpunk-mono inline-flex items-center justify-center rounded-md border border-accent/60 px-6 py-3 font-semibold uppercase tracking-wider text-foreground transition-colors hover:bg-accent/10">{{ sText }}</a>{% endif %}
|
||||||
</div>{% endif %}
|
</div>{% endif %}
|
||||||
{% if trustLogos %}<div class="mt-10">
|
{% if trustLogos %}<div class="mt-10">
|
||||||
<p class="cyberpunk-mono text-xs uppercase tracking-widest text-muted-foreground mb-3">Trusted by</p>
|
<p class="cyberpunk-mono text-xs uppercase tracking-widest text-muted-foreground mb-3">Trusted by</p>
|
||||||
@ -33,7 +33,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" %}cp-hero-tall{% elif minHeight == "50vh" %}cp-hero-short{% elif minHeight == "auto" %}cp-hero-auto{% else %}cp-hero-mid{% 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" %}cp-hero-tall{% elif minHeight == "50vh" %}cp-hero-short{% elif minHeight == "auto" %}cp-hero-auto{% else %}cp-hero-mid{% 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>{% else %}<div class="cyberpunk-rain-wrap z-0"><div class="cyberpunk-rain-fallback"></div><canvas class="cyberpunk-rain-canvas" aria-hidden="true"></canvas></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>{% else %}<div class="cyberpunk-rain-wrap z-0"><div class="cyberpunk-rain-fallback"></div><canvas class="cyberpunk-rain-canvas" aria-hidden="true"></canvas></div>{% endif %}
|
||||||
<div aria-hidden="true" class="scanlines pointer-events-none absolute inset-0 z-0"></div>
|
<div aria-hidden="true" class="scanlines pointer-events-none absolute inset-0 z-0"></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>
|
<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>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user