fix: Mobile Hero-Überschriften umbrechen
This commit is contained in:
1 parent
29f36009f0
commit
5951134fbe
2 files changed
+15
No files matched your search
@@ -256,6 +256,9 @@
|
|||||||
font-weight: 600; letter-spacing: -0.05em; line-height: 1.05;
|
font-weight: 600; letter-spacing: -0.05em; line-height: 1.05;
|
||||||
margin: 16px 0 14px;
|
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; }
|
.hero-sub { font-size: 15px; color: var(--text-leise); max-width: 560px; }
|
||||||
|
|
||||||
/* Abschnitts-Label im selben Fragment-Mono-Stil */
|
/* Abschnitts-Label im selben Fragment-Mono-Stil */
|
||||||
|
|||||||
@@ -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) {
|
if (failures.length) {
|
||||||
console.error(`\n${failures.length} Prüfung(en) fehlgeschlagen.`);
|
console.error(`\n${failures.length} Prüfung(en) fehlgeschlagen.`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in new issue
Block a user