Skip to content

Commit dd339e5

Browse files
committed
env: styled-components 설정
1 parent c43c4da commit dd339e5

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

styles/global-styles.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { createGlobalStyle } from 'styled-components';
2+
import { normalize } from 'styled-normalize';
3+
4+
const GlobalStyle = createGlobalStyle`
5+
${normalize}
6+
html {
7+
box-sizing: border-box;
8+
font-size: 62.5%; // 1rem === 10px
9+
}
10+
*,
11+
*::before,
12+
*::after {
13+
box-sizing: inherit;
14+
}
15+
* { font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;}
16+
`;
17+
18+
export default GlobalStyle;

styles/media.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const mediaQuery = (maxWidth: number) => `@media (max-width: ${maxWidth}px)`;
2+
3+
const media = {
4+
mobile: mediaQuery(375),
5+
tablet: mediaQuery(834),
6+
desktop: mediaQuery(1920),
7+
custom: mediaQuery,
8+
};
9+
10+
export default media;

styles/theme.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const theme = {
2+
white: '#ffffff',
3+
black: '#000000',
4+
};
5+
6+
export default theme;

0 commit comments

Comments
 (0)