-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
글로벌 스타일 안에 reset을 선언해주고 그 안에 globalStyle 작성해야합니다! 라이브러리도 설치해주세요~
src/styles/global.style.ts
Outdated
import { css } from '@emotion/react'; | ||
|
||
const globalStyle = css` | ||
html, |
There was a problem hiding this comment.
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 등 글로벌 스타일로 지정해주세요! 제가 노션에 남겨놨었는데 내일 확인 바랍니다~
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
깔끔하고 좋은 코드네요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] backGround는 backgroundGray 처럼 의미가 잘 전달되는 이름을 사용하면 좋을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
동의합니다 변수명 생각해보고 디자인 선생님분들께 문의 드려볼게요!
title1: SerializedStyles; | ||
title2: SerializedStyles; | ||
title3: SerializedStyles; | ||
title4: SerializedStyles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P5] 어려운 개념인데 너무 잘 적용했네요 배워갑니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P5] 저도 새로운 거 알아갑니당 !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
꺆~
src/styles/GlobalStyle.tsx
Outdated
const reset = css` | ||
* { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] 이름을 globalStyle 로 변수명을 바꾸고 이 안에 reset을 선언해준 다음에 이걸 글로벌 스타일로 사용해야합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
짚어주셔서 감사합니다!!! 수정했어유!
There was a problem hiding this 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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] reset 설치해주기 !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 설치했습니다!👍
title1: SerializedStyles; | ||
title2: SerializedStyles; | ||
title3: SerializedStyles; | ||
title4: SerializedStyles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P5] 저도 새로운 거 알아갑니당 !!
✨ 해당 이슈 번호 ✨
�closed #20
todo
📌 내가 알게 된 부분
트러블 슈팅
- 처음엔 SerializedStyle이라는 타입이 정의가 안되어 있나? 했고 그 후엔 @emotion/react의 에러인 줄 알고 삽질하다가 ..! - 에러가 eslint의 import/named 부분의 에러인 걸 발견해서 요 부분에 대해 다시 구글링했어요.📌 질문할 부분
📌스크린샷(선택)