fix: website factory render pass polish (0.5.8)
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
df0c34cd35
commit
261e9a21ee
20
docs/adr/0005-the-hero-scrim-lets-the-photo-show.md
Normal file
20
docs/adr/0005-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 magazine-bold 0.5.8, 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: chalk-lime dark destructive; chalk-lime light destructive; flux-green dark destructive; flux-green light accent; flux-green light destructive; ink-blue dark destructive; ink-blue light destructive; newsprint-voltage dark destructive; newsprint-voltage light accent; newsprint-voltage light destructive; signal-orange dark destructive; signal-orange light accent; signal-orange 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.
|
||||
- Prose link colours (`.mb-prose a`) apply only to links without their own classes. The default page template wraps every section in the prose styles, so the blog index's active filter pill drew its label in the accent on its own dark fill.
|
||||
|
||||
## Consequences
|
||||
|
||||
- magazine-bold 0.5.8 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it.
|
||||
- No schema field changes.
|
||||
|
||||
Keywords: mb-prose, filter pill, presets, AA, button contrast, primaryForeground, accentForeground, magazine-bold, hero, overlayColor, scrim, radial-gradient, contrast, WO-096, website factory, render pass
|
||||
@ -196,7 +196,7 @@ css:
|
||||
line-height: 1.0;
|
||||
color: hsl(var(--foreground));
|
||||
}
|
||||
.mb-prose a {
|
||||
.mb-prose a:not([class]) {
|
||||
color: hsl(var(--accent));
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
|
||||
32
presets.json
32
presets.json
@ -23,13 +23,13 @@
|
||||
"secondaryForeground": "0 0% 8%",
|
||||
"muted": "38 20% 92%",
|
||||
"mutedForeground": "0 0% 40%",
|
||||
"accent": "330 95% 55%",
|
||||
"accent": "330 95% 46%",
|
||||
"accentForeground": "0 0% 100%",
|
||||
"destructive": "0 84% 55%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 86%",
|
||||
"input": "0 0% 86%",
|
||||
"ring": "330 95% 55%"
|
||||
"ring": "330 95% 46%"
|
||||
},
|
||||
"darkColors": {
|
||||
"background": "0 0% 7%",
|
||||
@ -46,7 +46,7 @@
|
||||
"mutedForeground": "38 10% 62%",
|
||||
"accent": "330 100% 64%",
|
||||
"accentForeground": "0 0% 7%",
|
||||
"destructive": "0 84% 60%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 20%",
|
||||
"input": "0 0% 20%",
|
||||
@ -80,7 +80,7 @@
|
||||
"mutedForeground": "0 0% 40%",
|
||||
"accent": "220 100% 54%",
|
||||
"accentForeground": "0 0% 100%",
|
||||
"destructive": "0 84% 55%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 86%",
|
||||
"input": "0 0% 86%",
|
||||
@ -101,7 +101,7 @@
|
||||
"mutedForeground": "38 10% 62%",
|
||||
"accent": "216 100% 66%",
|
||||
"accentForeground": "0 0% 7%",
|
||||
"destructive": "0 84% 60%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 20%",
|
||||
"input": "0 0% 20%",
|
||||
@ -135,7 +135,7 @@
|
||||
"mutedForeground": "0 0% 40%",
|
||||
"accent": "78 90% 45%",
|
||||
"accentForeground": "0 0% 8%",
|
||||
"destructive": "0 84% 55%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 86%",
|
||||
"input": "0 0% 86%",
|
||||
@ -156,7 +156,7 @@
|
||||
"mutedForeground": "60 8% 62%",
|
||||
"accent": "76 92% 56%",
|
||||
"accentForeground": "0 0% 8%",
|
||||
"destructive": "0 84% 60%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 18%",
|
||||
"input": "0 0% 18%",
|
||||
@ -188,13 +188,13 @@
|
||||
"secondaryForeground": "0 0% 8%",
|
||||
"muted": "38 18% 92%",
|
||||
"mutedForeground": "0 0% 40%",
|
||||
"accent": "150 82% 38%",
|
||||
"accent": "150 82% 29%",
|
||||
"accentForeground": "0 0% 100%",
|
||||
"destructive": "0 84% 55%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 86%",
|
||||
"input": "0 0% 86%",
|
||||
"ring": "150 82% 38%"
|
||||
"ring": "150 82% 29%"
|
||||
},
|
||||
"darkColors": {
|
||||
"background": "0 0% 7%",
|
||||
@ -211,7 +211,7 @@
|
||||
"mutedForeground": "38 10% 62%",
|
||||
"accent": "146 90% 52%",
|
||||
"accentForeground": "0 0% 7%",
|
||||
"destructive": "0 84% 60%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 20%",
|
||||
"input": "0 0% 20%",
|
||||
@ -243,13 +243,13 @@
|
||||
"secondaryForeground": "0 0% 8%",
|
||||
"muted": "38 20% 92%",
|
||||
"mutedForeground": "0 0% 40%",
|
||||
"accent": "18 100% 50%",
|
||||
"accent": "18 100% 42%",
|
||||
"accentForeground": "0 0% 100%",
|
||||
"destructive": "0 84% 55%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 86%",
|
||||
"input": "0 0% 86%",
|
||||
"ring": "18 100% 50%"
|
||||
"ring": "18 100% 42%"
|
||||
},
|
||||
"darkColors": {
|
||||
"background": "0 0% 7%",
|
||||
@ -266,7 +266,7 @@
|
||||
"mutedForeground": "38 10% 62%",
|
||||
"accent": "22 100% 58%",
|
||||
"accentForeground": "0 0% 7%",
|
||||
"destructive": "0 84% 60%",
|
||||
"destructive": "0 84% 50%",
|
||||
"destructiveForeground": "0 0% 100%",
|
||||
"border": "0 0% 20%",
|
||||
"input": "0 0% 20%",
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
{% set align = "center" %}
|
||||
{% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
|
||||
<section data-block-override="magazine-bold:hero" 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 %}"><div class="mb-panel px-6 py-10 sm:px-10 sm:py-14">{{ herocontent(align) }}</div></div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user