From 5951134fbeebd90911eaf0c2f1f07f82850d53d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Thu, 30 Jul 2026 13:08:21 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Mobile=20Hero-=C3=9Cberschriften=20umbre?= =?UTF-8?q?chen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/custom/site.css | 3 +++ scripts/check-seo.mjs | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/public/custom/site.css b/public/custom/site.css index 90bb3b1..22fd6fb 100644 --- a/public/custom/site.css +++ b/public/custom/site.css @@ -256,6 +256,9 @@ font-weight: 600; letter-spacing: -0.05em; line-height: 1.05; margin: 16px 0 14px; } +@media (max-width: 809.98px) { + .hero-title { hyphens: auto; overflow-wrap: anywhere; } +} .hero-sub { font-size: 15px; color: var(--text-leise); max-width: 560px; } /* Abschnitts-Label im selben Fragment-Mono-Stil */ diff --git a/scripts/check-seo.mjs b/scripts/check-seo.mjs index d099ac5..5d100d1 100644 --- a/scripts/check-seo.mjs +++ b/scripts/check-seo.mjs @@ -312,6 +312,18 @@ if (wants('syntax')) { }); } +if (wants('responsive')) { + check('Hero-Titel können auf Mobilgeräten lange Wörter umbrechen', () => { + const css = read('public/custom/site.css'); + const mobileHeroRule = css.match( + /@media\s*\(max-width:\s*809\.98px\)\s*\{\s*\.hero-title\s*\{([^}]*)\}\s*\}/ + ); + assert.ok(mobileHeroRule, 'Mobile .hero-title-Regel fehlt'); + assert.match(mobileHeroRule[1], /hyphens:\s*auto;/); + assert.match(mobileHeroRule[1], /overflow-wrap:\s*anywhere;/); + }); +} + if (failures.length) { console.error(`\n${failures.length} Prüfung(en) fehlgeschlagen.`); process.exit(1);