Skip to content

Commit

Permalink
Fix height isses at large screen sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
lovephimu committed Jan 24, 2024
1 parent 890a682 commit b6bd375
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
.dynamic-full-height {
height: 100dvh;
}

@media (min-height: 2000px) {
.wide-screen-height {
height: 35dvh !important;
}
.wide-screen-height-logo {
height: 10dvh !important;
}
}
6 changes: 4 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ export default function RootLayout({
className={`bg-primaryBlue ${inter.className} dynamic-full-height flex flex-col w-full items-center sm:p-10`}
>
<main className="h-[100dvh] max-h-[100dvh] w-full flex flex-col justify-center items-center">
<section className="flex h-[20dvh] justify-center w-full sm:justify-start sm:max-w-2xl sm:border-primaryPink sm:border-t sm:border-x sm:rounded-t-2xl">
<section className="flex h-[20dvh] justify-center w-full sm:justify-start sm:max-w-2xl sm:border-primaryPink sm:border-t sm:border-x sm:rounded-t-2xl wide-screen-height-logo">
<ChatLogo />
</section>
<section className="w-full flex justify-center">{children}</section>
<section className="w-full flex justify-center h-[80dvh] sm:h-[70dvh] wide-screen-height">
{children}
</section>
</main>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Chat from './components/Chat';

export default function Home() {
return (
<section className="text-primaryPink h-full w-full flex justify-center sm:max-w-2xl sm:border-b-4 sm:border-x sm:rounded-b-2xl sm:border-primaryPink">
<section className="text-primaryPink h-full w-full flex justify-center sm:max-w-2xl sm:border-b-8 sm:border-x sm:rounded-b-2xl sm:border-primaryPink">
<Chat />
</section>
);
Expand Down

0 comments on commit b6bd375

Please sign in to comment.