From c24a14d1e31a1052a48815d6b452f3c6a3667530 Mon Sep 17 00:00:00 2001 From: niklas westman Date: Thu, 30 Apr 2026 14:32:04 +0200 Subject: [PATCH] Fix horizontal page overflow --- src/components/organisms/hero/hero.tsx | 3 +-- src/globalStyles.ts | 2 ++ src/pages/home-page.tsx | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/organisms/hero/hero.tsx b/src/components/organisms/hero/hero.tsx index 8001dd0..d24785e 100644 --- a/src/components/organisms/hero/hero.tsx +++ b/src/components/organisms/hero/hero.tsx @@ -6,9 +6,8 @@ import { HeroContent } from "./hero-content"; const HeroSection = styled.section` position: relative; - width: 100vw; + width: 100%; min-height: clamp(620px, 82vh, 760px); - margin-left: calc(50% - 50vw); overflow: hidden; background: ${({ theme }) => theme.color.background}; isolation: isolate; diff --git a/src/globalStyles.ts b/src/globalStyles.ts index d87f168..b378475 100644 --- a/src/globalStyles.ts +++ b/src/globalStyles.ts @@ -12,6 +12,7 @@ export const GlobalStyles = createGlobalStyle` } html { + overflow-x: clip; scroll-behavior: smooth; } @@ -24,6 +25,7 @@ export const GlobalStyles = createGlobalStyle` body { margin: 0; min-width: 320px; + overflow-x: clip; background: ${({ theme }) => theme.color.background}; color: ${({ theme }) => theme.color.text}; font-family: ${({ theme }) => theme.typography.mono}; diff --git a/src/pages/home-page.tsx b/src/pages/home-page.tsx index e7f0fd9..f7bacae 100644 --- a/src/pages/home-page.tsx +++ b/src/pages/home-page.tsx @@ -22,9 +22,7 @@ export function HomePage({ content }: HomePageProps): JSX.Element { <>
- - - +