1. default style 설정하기
- styled-reset 으로 기본 스타일 초기화
- box-sizing, 배경, 폰트 색상 정도 설정해주기
- 폰트는 system-ui를 사용하면 사용자 운영체제 설정 폰트를 따른다
import CreateAccount from "./routes/create-account";
import { createGlobalStyle } from "styled-components";
import reset from "styled-reset";
const GlobalStyles = createGlobalStyle`
${reset};
* {
box-sizing: border-box;
}
body {
background-color: black;
color: white;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}
`;
function App() {
return (
<>
<GlobalStyles />
<RouterProvider router={router} />
</>
);
}
'[Study] 개발 공부' 카테고리의 다른 글
정처기 필기 3일 공부해서 합격하기 (0) | 2024.05.13 |
---|---|
VITE 환경에서의 Firebase 초기화와 .env (0) | 2024.05.02 |
Loading 상태와 컴포넌트 (1) | 2024.05.02 |
라우팅: ReactRouter의 <Outlet> (0) | 2024.05.01 |
React + TypeScript + Vite 프로젝트 시작하기 (0) | 2024.05.01 |