Skip to content

Commit

Permalink
Merge pull request #138 from woowacourse-teams/feat/#135
Browse files Browse the repository at this point in the history
max-width theme으로 변경
  • Loading branch information
cys4585 authored Jul 30, 2024
2 parents 64ecf0d + 644be78 commit e31759d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/common/reset.style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DISPLAY_MAX_WIDTH } from '@_constants/styles';
import layout from '@_common/theme/layout';
import { css } from '@emotion/react';

const reset = css`
Expand Down Expand Up @@ -111,7 +111,7 @@ const reset = css`
body {
position: relative;
max-width: ${DISPLAY_MAX_WIDTH};
${layout.default}
margin: 0 auto;
line-height: 1;
}
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/common/theme/layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { css } from '@emotion/react';

const layout = {
default: css`
max-width: 60rem;
`,
};

export default layout;
2 changes: 2 additions & 0 deletions frontend/src/common/theme/theme.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { Theme } from './theme.type';
import typography from './typography';
import colorPalette from './colorPalette';
import semantic from './semantic';
import layout from './layout';

export const theme: Theme = {
colorPalette,
typography,
semantic,
layout,
};
5 changes: 5 additions & 0 deletions frontend/src/common/theme/theme.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ export interface Typography {
Tiny: SerializedStyles;
}

export interface Layout {
default: SerializedStyles;
}

export interface Theme {
colorPalette: Colors;
typography: Typography;
semantic: Semantic;
layout: Layout;
}
1 change: 1 addition & 0 deletions frontend/src/emotion.d.ts → frontend/src/emotion.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ declare module '@emotion/react' {
colorPalette: Colors;
typography: Typography;
semantic: Semantic;
layout: Layout;
}
}

0 comments on commit e31759d

Please sign in to comment.