fix: website factory render pass polish (0.4.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
2cf2ae521e
commit
cb3bf48c06
@ -40,7 +40,7 @@
|
|||||||
max-width: 80ch;
|
max-width: 80ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terminal-prose a {
|
.terminal-prose a:not([class]) {
|
||||||
color: hsl(var(--accent));
|
color: hsl(var(--accent));
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-underline-offset: 0.2em;
|
text-underline-offset: 0.2em;
|
||||||
|
|||||||
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 terminal 0.4.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: amber-crt dark destructive; amber-crt light accent; amber-crt light primary; ice-terminal dark destructive; ice-terminal light accent; magenta-hacker dark destructive; paper-tty dark destructive; phosphor-green dark 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 (`.terminal-prose a`, in both the manifest CSS and `assets/style.css`) 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
|
||||||
|
|
||||||
|
- terminal 0.4.8 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it.
|
||||||
|
- No schema field changes.
|
||||||
|
|
||||||
|
Keywords: terminal-prose, filter pill, presets, AA, button contrast, primaryForeground, accentForeground, terminal, hero, overlayColor, scrim, radial-gradient, contrast, WO-096, website factory, render pass
|
||||||
@ -166,7 +166,7 @@ css:
|
|||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terminal-prose a {
|
.terminal-prose a:not([class]) {
|
||||||
color: hsl(var(--accent));
|
color: hsl(var(--accent));
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-underline-offset: 0.2em;
|
text-underline-offset: 0.2em;
|
||||||
|
|||||||
18
presets.json
18
presets.json
@ -46,7 +46,7 @@
|
|||||||
"mutedForeground": "120 40% 50%",
|
"mutedForeground": "120 40% 50%",
|
||||||
"accent": "120 100% 60%",
|
"accent": "120 100% 60%",
|
||||||
"accentForeground": "0 0% 4%",
|
"accentForeground": "0 0% 4%",
|
||||||
"destructive": "0 90% 55%",
|
"destructive": "0 90% 48%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "120 60% 25%",
|
"border": "120 60% 25%",
|
||||||
"input": "120 50% 18%",
|
"input": "120 50% 18%",
|
||||||
@ -72,19 +72,19 @@
|
|||||||
"cardForeground": "30 25% 15%",
|
"cardForeground": "30 25% 15%",
|
||||||
"popover": "40 30% 99%",
|
"popover": "40 30% 99%",
|
||||||
"popoverForeground": "30 25% 15%",
|
"popoverForeground": "30 25% 15%",
|
||||||
"primary": "30 80% 40%",
|
"primary": "30 80% 37%",
|
||||||
"primaryForeground": "40 30% 98%",
|
"primaryForeground": "40 30% 98%",
|
||||||
"secondary": "38 25% 90%",
|
"secondary": "38 25% 90%",
|
||||||
"secondaryForeground": "30 25% 22%",
|
"secondaryForeground": "30 25% 22%",
|
||||||
"muted": "40 20% 91%",
|
"muted": "40 20% 91%",
|
||||||
"mutedForeground": "30 15% 40%",
|
"mutedForeground": "30 15% 40%",
|
||||||
"accent": "25 85% 43%",
|
"accent": "25 85% 39%",
|
||||||
"accentForeground": "40 30% 98%",
|
"accentForeground": "40 30% 98%",
|
||||||
"destructive": "0 70% 45%",
|
"destructive": "0 70% 45%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "38 20% 78%",
|
"border": "38 20% 78%",
|
||||||
"input": "38 20% 84%",
|
"input": "38 20% 84%",
|
||||||
"ring": "30 80% 40%"
|
"ring": "30 80% 37%"
|
||||||
},
|
},
|
||||||
"darkColors": {
|
"darkColors": {
|
||||||
"background": "30 20% 4%",
|
"background": "30 20% 4%",
|
||||||
@ -101,7 +101,7 @@
|
|||||||
"mutedForeground": "38 50% 50%",
|
"mutedForeground": "38 50% 50%",
|
||||||
"accent": "45 100% 60%",
|
"accent": "45 100% 60%",
|
||||||
"accentForeground": "30 20% 4%",
|
"accentForeground": "30 20% 4%",
|
||||||
"destructive": "0 90% 55%",
|
"destructive": "0 90% 48%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "38 60% 28%",
|
"border": "38 60% 28%",
|
||||||
"input": "38 50% 20%",
|
"input": "38 50% 20%",
|
||||||
@ -157,7 +157,7 @@
|
|||||||
"accent": "60 100% 70%",
|
"accent": "60 100% 70%",
|
||||||
"accentForeground": "0 0% 5%",
|
"accentForeground": "0 0% 5%",
|
||||||
"destructive": "0 90% 60%",
|
"destructive": "0 90% 60%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 9%",
|
||||||
"border": "0 0% 30%",
|
"border": "0 0% 30%",
|
||||||
"input": "0 0% 18%",
|
"input": "0 0% 18%",
|
||||||
"ring": "0 0% 95%"
|
"ring": "0 0% 95%"
|
||||||
@ -188,7 +188,7 @@
|
|||||||
"secondaryForeground": "200 40% 20%",
|
"secondaryForeground": "200 40% 20%",
|
||||||
"muted": "200 20% 92%",
|
"muted": "200 20% 92%",
|
||||||
"mutedForeground": "200 15% 40%",
|
"mutedForeground": "200 15% 40%",
|
||||||
"accent": "185 85% 32%",
|
"accent": "185 85% 29%",
|
||||||
"accentForeground": "200 30% 98%",
|
"accentForeground": "200 30% 98%",
|
||||||
"destructive": "0 70% 45%",
|
"destructive": "0 70% 45%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
@ -211,7 +211,7 @@
|
|||||||
"mutedForeground": "185 40% 52%",
|
"mutedForeground": "185 40% 52%",
|
||||||
"accent": "175 95% 55%",
|
"accent": "175 95% 55%",
|
||||||
"accentForeground": "200 40% 5%",
|
"accentForeground": "200 40% 5%",
|
||||||
"destructive": "0 85% 55%",
|
"destructive": "0 85% 50%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "190 60% 26%",
|
"border": "190 60% 26%",
|
||||||
"input": "190 50% 18%",
|
"input": "190 50% 18%",
|
||||||
@ -266,7 +266,7 @@
|
|||||||
"mutedForeground": "320 40% 55%",
|
"mutedForeground": "320 40% 55%",
|
||||||
"accent": "285 90% 62%",
|
"accent": "285 90% 62%",
|
||||||
"accentForeground": "300 25% 5%",
|
"accentForeground": "300 25% 5%",
|
||||||
"destructive": "0 85% 58%",
|
"destructive": "0 85% 50%",
|
||||||
"destructiveForeground": "0 0% 100%",
|
"destructiveForeground": "0 0% 100%",
|
||||||
"border": "320 55% 28%",
|
"border": "320 55% 28%",
|
||||||
"input": "320 45% 20%",
|
"input": "320 45% 20%",
|
||||||
|
|||||||
@ -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" %}min-h-screen{% elif minHeight == "50vh" %}min-h-[50vh]{% elif minHeight == "auto" %}min-h-96{% 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-96{% 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>{% else %}<div class="tty-rain-wrap z-0"><div class="tty-rain-fallback"></div><canvas class="tty-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="tty-rain-wrap z-0"><div class="tty-rain-fallback"></div><canvas class="tty-rain-canvas" aria-hidden="true"></canvas></div>{% endif %}
|
||||||
<div aria-hidden="true" class="tty-scanlines pointer-events-none absolute inset-0 z-0"></div>
|
<div aria-hidden="true" class="tty-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