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

[Init/#20] theme, GlobalStyle 세팅 #29

Merged
merged 21 commits into from
Jan 7, 2024
Merged

Conversation

namdaeun
Copy link
Member

@namdaeun namdaeun commented Jan 7, 2024

✨ 해당 이슈 번호 ✨

closed #20

todo

  • theme -> color, font 설정
  • GlobalStyle -> reset css 설정

📌 내가 알게 된 부분

  • linear-gradient 속성은 background-image 속성에서 적용 가능하다 (* background-color 속성에선 적용 안됨)

트러블 슈팅

스크린샷 2024-01-07 오후 7 39 21 스크린샷 2024-01-07 오후 7 58 48 - 처음엔 SerializedStyle이라는 타입이 정의가 안되어 있나? 했고 그 후엔 @emotion/react의 에러인 줄 알고 삽질하다가 ..! - 에러가 eslint의 import/named 부분의 에러인 걸 발견해서 요 부분에 대해 다시 구글링했어요. 스크린샷 2024-01-07 오후 8 16 35
  • 그랬더니 생각보다 너어무 간단하게 해결.... type 키워드만 붙여서 import문 작성해주니까 바로 되더라고요?...SerializedStyles가 타입이라서 타입을 명시해줘야하나봅니다.. 좀 더 알아보고 다시 트러블 슈팅 글 작성하도록 하겠습니다.
  • 다음 링크 참고해서 해결했습니다!

📌 질문할 부분

  • 제대로 적용되나 한 번만 더 확인해주시면 감사하겠습니다!

📌스크린샷(선택)

스크린샷 2024-01-08 오전 3 31 46 스크린샷 2024-01-08 오전 3 35 54

@namdaeun namdaeun added 🪡 Init 작업 초기 세팅 다은 labels Jan 7, 2024
@namdaeun namdaeun self-assigned this Jan 7, 2024
Copy link
Member

@ljh0608 ljh0608 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

글로벌 스타일 안에 reset을 선언해주고 그 안에 globalStyle 작성해야합니다! 라이브러리도 설치해주세요~

import { css } from '@emotion/react';

const globalStyle = css`
html,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2]

* {
  box-sizing: border-box;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;

}


  html, body {

  margin: 0 auto;
  font-size: 62.5%;
  }

a {
cursor: pointer;

text-decoration: none;
color:inherit;
}


button {
border: none;
background: none;
  cursor: pointer;
font: inherit;
}

select{
  cursor: pointer;
}
`;

위와 같이 버튼에는 pointer와 border none 등 글로벌 스타일로 지정해주세요! 제가 노션에 남겨놨었는데 내일 확인 바랍니다~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 수정했습니다 감사합니다✨

mileGreen: '#C5DB8F',
lightGreen: '#F1F6E2',
backGround: '#F5F5F7',
black: '#010101',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔하고 좋은 코드네요~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] backGround는 backgroundGray 처럼 의미가 잘 전달되는 이름을 사용하면 좋을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

동의합니다 변수명 생각해보고 디자인 선생님분들께 문의 드려볼게요!

Comment on lines +30 to +33
title1: SerializedStyles;
title2: SerializedStyles;
title3: SerializedStyles;
title4: SerializedStyles;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P5] 어려운 개념인데 너무 잘 적용했네요 배워갑니다~

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P5] 저도 새로운 거 알아갑니당 !!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꺆~☺️

Comment on lines 3 to 4
const reset = css`
* {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 이름을 globalStyle 로 변수명을 바꾸고 이 안에 reset을 선언해준 다음에 이걸 글로벌 스타일로 사용해야합니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

짚어주셔서 감사합니다!!! 수정했어유!

Copy link
Contributor

@se0jinYoon se0jinYoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

디코에서 말한 부분만 수정해주세용 -!-!

src/main.tsx Outdated
@@ -1,13 +1,15 @@
import React from 'react';

import { ThemeProvider } from '@emotion/react';
import { Global, ThemeProvider } from '@emotion/react';
import reset from 'emotion-reset';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] reset 설치해주기 !!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 설치했습니다!👍

Comment on lines +30 to +33
title1: SerializedStyles;
title2: SerializedStyles;
title3: SerializedStyles;
title4: SerializedStyles;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P5] 저도 새로운 거 알아갑니당 !!

@github-actions github-actions bot added the size/l size/l label Jan 7, 2024
@ljh0608 ljh0608 merged commit 7c1204c into develop Jan 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪡 Init 작업 초기 세팅 size/l size/l 다은
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ init ] theme, GlobalStyle 설정
3 participants