From 2b783876f8df37e23658b669545e55322ddff5d2 Mon Sep 17 00:00:00 2001 From: cverorg <292680828+cverorg@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:16:54 +0900 Subject: [PATCH] sitetile: every section gets the shared inset floor; gallery, tagcloud and collection-pills get base paint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A coral that forgot its own container rule rendered its text at x=0 on desktop and phone (faq was fixed one at a time in #6; gallery, carousel, collection and timeline still did it). The floor: :where(section[class^="st-"]:not(.st-full-bleed)) carries the shared wrapper's max-width/margin/padding at zero specificity, so every existing per-coral rule keeps its own values; hero opts out with .st-full-bleed while its inner content stays inset. tile-lab#11: gallery cells, tag pills and collection pills had no rule at all — they now reuse the existing filter-pill idiom and a responsive grid. pre.st-code gets max-width:100%; inline code spans get overflow-wrap:anywhere so a quoted line never widens the page. New section-inset.test.mjs scans every coral's emitted markup, so a future coral is covered without being listed. --- packages/sitetile/astro/smoke-build.mjs | 11 +- .../astro/src/components/sections/Hero.astro | 6 +- packages/sitetile/astro/src/styles/site.css | 74 ++++- packages/sitetile/section-inset.test.mjs | 260 ++++++++++++++++++ 4 files changed, 344 insertions(+), 7 deletions(-) create mode 100644 packages/sitetile/section-inset.test.mjs diff --git a/packages/sitetile/astro/smoke-build.mjs b/packages/sitetile/astro/smoke-build.mjs index 53e1307..f8ec00e 100644 --- a/packages/sitetile/astro/smoke-build.mjs +++ b/packages/sitetile/astro/smoke-build.mjs @@ -189,12 +189,17 @@ function claimedIcons() { const checks = [ // -- home.md: the 5 section types + platform defaults -- - ['hero renders', () => occ('class="st-hero"') === 1], + // 🩸 2026-08-28. `class="st-hero"` was an EXACT string match, so it broke the moment the section + // gained a second class — which every hero variant now does (`.st-full-bleed`, the opt-out from + // the generic section-inset floor below; see site.css). Matched here as `st-hero st-full-bleed` + // rather than loosened to a substring check, so the assertion still pins the exact class list a + // non-layered hero renders, not just "some class starting with st-hero". + ['hero renders', () => occ('class="st-hero st-full-bleed"') === 1], ['grid renders', () => occ('class="st-grid"') === 1], ['prose renders', () => occ('class="st-prose"') >= 1], ['cta renders', () => occ('class="st-cta"') === 1], ['embed renders', () => occ('class="st-embed"') === 1], - ['hero background-image', () => /class="st-hero"[^>]*background-image:url\(/.test(html)], + ['hero background-image', () => /class="st-hero st-full-bleed"[^>]*background-image:url\(/.test(html)], ['hero CTA anchor', () => /st-hero-cta"\s+href="\/checkup"/.test(html)], ['grid has 3 cells', () => occ('class="st-cell"') === 3], ['grid cols=3', () => /class="st-grid"[^>]*\sdata-cols="3"/.test(html)], @@ -255,7 +260,7 @@ const checks = [ ['nav: ARBITRARY depth — 3rd-level leaf renders', () => html.includes('rf-nav-subgroup') && html.includes('href="/games/puzzle"')], ['nav: default flyout CSS present (hover reveal)', () => allCss().replace(/\s+/g, '').includes('.rf-nav-group:hover>.rf-nav-sub')], // -- markers.md: graduated markers the home fixture can't reach -- - ['markers: hero media=logo (uncropped, not round)', () => /
]*\sdata-media="logo"/.test(markers)], + ['markers: hero media=logo (uncropped, not round)', () => /
]*\sdata-media="logo"/.test(markers)], ['markers: block image → figure+img', () => /
\s*Mark markers.includes('') && diff --git a/packages/sitetile/astro/src/components/sections/Hero.astro b/packages/sitetile/astro/src/components/sections/Hero.astro index 9cbce8e..d9f390c 100644 --- a/packages/sitetile/astro/src/components/sections/Hero.astro +++ b/packages/sitetile/astro/src/components/sections/Hero.astro @@ -40,7 +40,7 @@ const logo = pm.logo ? (typeof pm.logo === 'object' ? (pm.logo.href || pm.logo.l const logoPos = pm['logo-pos'] ? String(typeof pm['logo-pos'] === 'object' ? pm['logo-pos'].label : pm['logo-pos']) : 'bottom'; --- {layerList.length ? ( -
+
) : layout ? ( -
+
{marqueeWords.length > 0 && (
) : ( -
+
{enter && pm.bg &&