Skip to content

Commit

Permalink
UI: #21 Default Layout의 contents 부분의 크기 제한 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed Jun 20, 2024
1 parent 1b173dc commit 927aa99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* contents size */
--height-header: 4rem;
--height-contents: calc(100vh - var(--height-header));
--max-width-contents: 90rem;

/* font-family */
--font-family-roboto: 'Roboto', sans-serif;
Expand Down
6 changes: 4 additions & 2 deletions src/layouts/DefaultLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Outlet } from 'react-router-dom';
import Header from '@/components/common/Header';
import Header from '@components/common/Header';

export default function DefaultLayout() {
return (
<>
<Header />
<Outlet />
<main className="m-auto h-contents max-w-contents">
<Outlet />
</main>
</>
);
}
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default {
header: 'var(--height-header)',
contents: 'var(--height-contents)',
},
maxWidth: {
contents: 'var(--max-width-contents)',
},
fontFamily: {
roboto: 'var(--font-family-roboto)',
},
Expand Down

0 comments on commit 927aa99

Please sign in to comment.