diff --git a/assets/style.css b/assets/style.css index c523117..7e29dd5 100644 --- a/assets/style.css +++ b/assets/style.css @@ -280,14 +280,22 @@ .brutalist-hero .headline { font-family: var(--font-heading, "Space Grotesk", sans-serif); font-weight: 700; - font-size: clamp(3rem, 22vw, 18rem); + font-size: clamp(2rem, min(var(--headline-word, 22vw), var(--headline-length, 22vw)), 18rem); line-height: 0.85; letter-spacing: -0.04em; text-transform: uppercase; color: hsl(var(--foreground)); margin: 0; + overflow-wrap: anywhere; } +.brutalist-hero .headline-mid { --headline-length: min(12vw, 9.5rem); } +.brutalist-hero .headline-long { --headline-length: min(8vw, 6.5rem); } +.brutalist-hero .headline-w7 { --headline-word: min(16vw, 12.5rem); } +.brutalist-hero .headline-w9 { --headline-word: min(12.5vw, 10rem); } +.brutalist-hero .headline-w11 { --headline-word: min(10.5vw, 8.25rem); } +.brutalist-hero .headline-w13 { --headline-word: min(9vw, 7rem); } + .brutalist-hero[data-has-media="true"] .headline { color: hsl(var(--background)); mix-blend-mode: difference; diff --git a/docs/adr/0007-the-hero-headline-fits-its-width.md b/docs/adr/0007-the-hero-headline-fits-its-width.md new file mode 100644 index 0000000..e2ac53c --- /dev/null +++ b/docs/adr/0007-the-hero-headline-fits-its-width.md @@ -0,0 +1,19 @@ +# The hero headline fits its width + +Decided 2026-11-22 for brutalist 0.7.8, from the website factory's launch runs (orchestrator WO-101, ADR 0092). + +## Context + +The website factory compiles a customer's site onto this theme. Twelve launch sites built on dev on 2026-11-22 showed defects on their home pages, recorded in the orchestrator's `docs/works/evidence/WO-090/runs/RESULTS.md`; the render pass now also renders a 60 to 80 character headline with long words on every theme. + +## Decision + +- The hero headline takes its size from its longest word and its length. The template adds `headline-w7`, `headline-w9`, `headline-w11` or `headline-w13` for each word of 7 to 8, 9 to 10, 11 to 12 and 13 or more letters, and `headline-mid` or `headline-long` past 20 and 40 characters; each sets a custom property, and the font size is the smaller of the two, between 2rem and the old 18rem. The sizes allow about 0.7em a letter for the uppercase display face, in viewport width and capped in rem by the 70rem column. `overflow-wrap: anywhere` breaks a word that is longer still. The old `clamp(3rem, 22vw, 18rem)` fitted about six letters, so Kova Studio's "RISOGRAPHED" and "IDENTITIES" ran off the right edge at 1280 and 390, and its ten-word headline filled two and a half screens. A short headline of short words keeps the old size. +- `assets/style.css` carries the same rules, since it is served after the site stylesheet and repeats the headline rule. + +## Consequences + +- brutalist 0.7.8 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it. +- No schema field changes. Production sites on this theme pick the change up with the automatic theme update; the regression check for sites the factory did not build compared the production release with 0.7.8 (orchestrator `docs/works/evidence/WO-101/theme-regression/`). + +Keywords: hero, headline, long headline, headline-w7, headline-w9, headline-w11, headline-w13, headline-mid, headline-long, clamp, overflow-wrap, clipped headline, WO-101, website factory, launch runs, brutalist diff --git a/manifest.yaml b/manifest.yaml index 835dea4..8f9f74b 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -407,14 +407,24 @@ css: .brutalist-hero .headline { font-family: var(--font-heading, "Space Grotesk", sans-serif); font-weight: 700; - font-size: clamp(3rem, 22vw, 18rem); + font-size: clamp(2rem, min(var(--headline-word, 22vw), var(--headline-length, 22vw)), 18rem); line-height: 0.85; letter-spacing: -0.04em; text-transform: uppercase; color: hsl(var(--foreground)); margin: 0; + overflow-wrap: anywhere; } + /* The longest word must fit the hero's width (about 0.7em a letter in uppercase Space Grotesk), and a long + headline takes fewer lines. Later word classes win, so the longest word sets the size. */ + .brutalist-hero .headline-mid { --headline-length: min(12vw, 9.5rem); } + .brutalist-hero .headline-long { --headline-length: min(8vw, 6.5rem); } + .brutalist-hero .headline-w7 { --headline-word: min(16vw, 12.5rem); } + .brutalist-hero .headline-w9 { --headline-word: min(12.5vw, 10rem); } + .brutalist-hero .headline-w11 { --headline-word: min(10.5vw, 8.25rem); } + .brutalist-hero .headline-w13 { --headline-word: min(9vw, 7rem); } + .brutalist-hero[data-has-media="true"] .headline { color: hsl(var(--background)); mix-blend-mode: difference; diff --git a/plugin.mod b/plugin.mod index f54b369..25d4e83 100644 --- a/plugin.mod +++ b/plugin.mod @@ -2,7 +2,7 @@ name = "brutalist" display_name = "Brutalist" scope = "@themes" -version = "0.7.7" +version = "0.7.8" description = "Concrete, oversized type, hard 12-col grid theme for design studios, architecture firms and art galleries." kind = "theme" categories = ["templates"] diff --git a/templates/overrides/brutalist/hero.ninjatpl b/templates/overrides/brutalist/hero.ninjatpl index 8388cb4..d9867b5 100644 --- a/templates/overrides/brutalist/hero.ninjatpl +++ b/templates/overrides/brutalist/hero.ninjatpl @@ -14,7 +14,7 @@
{% if eyebrowText %}{{ eyebrowText }}{% endif %} -{% if headlineText %}

{{ headlineText }}

{% endif %} +{% if headlineText %}

12 %} headline-w13{% elif w|length > 10 %} headline-w11{% elif w|length > 8 %} headline-w9{% elif w|length > 6 %} headline-w7{% endif %}{% endfor %}">{{ headlineText }}

{% endif %} {% if subText %}

{{ subText }}

{% endif %} {% if descText %}

{{ descText }}

{% endif %} {% if pText or sText %}
{% if pText and pUrl %}{{ pText }}{% endif %}{% if sText and sUrl %}{{ sText }}{% endif %}
{% endif %}