diff --git a/src/index.css b/src/index.css index f9be7b4..c08ad7c 100644 --- a/src/index.css +++ b/src/index.css @@ -146,6 +146,11 @@ scroll-behavior: smooth; } + /* Anker-Ziele (#features, #services, #process, #contact) nicht unter dem fixen Header landen lassen */ + section[id] { + scroll-margin-top: 6rem; + } + body { @apply bg-background text-foreground antialiased; font-family: 'Inter', system-ui, sans-serif; diff --git a/src/test/sofort-paket.test.tsx b/src/test/sofort-paket.test.tsx index c0ed658..e98027a 100644 --- a/src/test/sofort-paket.test.tsx +++ b/src/test/sofort-paket.test.tsx @@ -450,3 +450,9 @@ describe("C3 Seitentitel und Beschreibung der Unterseiten", () => { expect(document.title).toBe("Seite nicht gefunden | WEBklar"); }); }); + +describe("A5 Anker landen nicht unter dem fixen Header", () => { + it("section[id] hat ein scroll-margin-top von etwa 6rem", () => { + expect(lies("src/index.css")).toMatch(/section\[id\]\s*\{[^}]*scroll-margin-top:\s*6rem/); + }); +});