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);