Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max-width theme으로 변경 #138

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
Loading