-
Notifications
You must be signed in to change notification settings - Fork 1
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
[송규경] Chore/Design: Design System 세팅 및 Nested CSS warning 해결 #15
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1,5 +1,6 @@ | |||
module.exports = { | |||
plugins: { | |||
'tailwindcss/nesting': {}, |
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.
warning 해결 포인트입니다
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.
오호 클래스명이 아니라 css 파일 내에서 nesting(중첩) 문법을 사용할 때 쓰일 때 필요한 요소로 보이는데 맞나요?!
테일윈드에서 nesting 문법으로 @apply
을 보통 이용하지 않나요?!
// Noto sans 폰트 적용 | ||
const notoSansKr = Noto_Sans_KR({ | ||
preload: false, | ||
weight: ['100', '200', '300', '400', '500', '600', '700', '800', '900'], | ||
}); |
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.
notoSansKr의 경우, preload false 값으로 불러옵니다.
md: '0.375rem', | ||
lg: '0.5rem', | ||
sm: '0.5rem', // 추후 수정 가능 | ||
md: '1.5rem', // 추후 수정 가능 |
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.
Figma design system 기본 값을 md 설정했어요
DEFAULT: 'var(--primary-400)', | ||
1: 'var(--primary-50)', | ||
2: 'var(--primary-100)', | ||
3: 'var(--primary-200)', | ||
4: 'var(--primary-300)', | ||
5: 'var(--primary-500)', | ||
6: 'var(--primary-600)', | ||
7: 'var(--primary-700)', | ||
8: 'var(--primary-800)', | ||
9: 'var(--primary-900)', |
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.
Primary Color
DEFAULT의 경우 아래와 같이,
className="text-primary"
다른건 아래와 같이,
className="text-primary-4"
1: 'var(--gray-50)', | ||
2: 'var(--gray-100)', | ||
3: 'var(--gray-200)', | ||
4: 'var(--gray-300)', | ||
5: 'var(--gray-400)', | ||
6: 'var(--gray-500)', | ||
7: 'var(--gray-600)', | ||
8: 'var(--gray-700)', | ||
9: 'var(--gray-800)', |
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.
Gray Color
아래와 같이,
className="bg-gray-9"
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.
LGTM! 👍🏻 고생하셨습니다!
@@ -1,5 +1,6 @@ | |||
module.exports = { | |||
plugins: { | |||
'tailwindcss/nesting': {}, |
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.
오호 클래스명이 아니라 css 파일 내에서 nesting(중첩) 문법을 사용할 때 쓰일 때 필요한 요소로 보이는데 맞나요?!
테일윈드에서 nesting 문법으로 @apply
을 보통 이용하지 않나요?!
@@ -17,7 +20,7 @@ export default function RootLayout({ | |||
}>) { | |||
return ( | |||
<html lang="ko"> | |||
<body className={inter.className}> | |||
<body className={notoSansKr.className}> |
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.
혹시 레이아웃
에 폰트에 관련한 클래스를 넣은 이유가 있을까요?!
글로벌 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.
google font를 import 해서 가장 최상단 root Layout에서 감싸주려고 했어요
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 900; | ||
font-display: swap; | ||
src: local("Pretendard Black"), | ||
url("/fonts/Pretendard-Black.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-Black.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 800; | ||
font-display: swap; | ||
src: local("Pretendard ExtraBold"), | ||
url("/fonts/Pretendard-ExtraBold.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-ExtraBold.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 700; | ||
font-display: swap; | ||
src: local("Pretendard Bold"), | ||
url("/fonts/Pretendard-Bold.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-Bold.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 600; | ||
font-display: swap; | ||
src: local("Pretendard SemiBold"), | ||
url("/fonts/Pretendard-SemiBold.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-SemiBold.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 500; | ||
font-display: swap; | ||
src: local("Pretendard Medium"), | ||
url("/fonts/Pretendard-Medium.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-Medium.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 400; | ||
font-display: swap; | ||
src: local("Pretendard Regular"), | ||
url("/fonts/Pretendard-Regular.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-Regular.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 300; | ||
font-display: swap; | ||
src: local("Pretendard Light"), | ||
url("/fonts/Pretendard-Light.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-Light.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 200; | ||
font-display: swap; | ||
src: local("Pretendard ExtraLight"), | ||
url("/fonts/Pretendard-ExtraLight.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-ExtraLight.subset.woff") format("woff"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Pretendard"; | ||
font-weight: 100; | ||
font-display: swap; | ||
src: local("Pretendard Thin"), | ||
url("/fonts/Pretendard-Thin.subset.woff2") format("woff2"), | ||
url("/fonts/Pretendard-Thin.subset.woff") format("woff"); | ||
} |
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.
헉 엄청나게 코드를 줄이셨네요 👍🏻
📖 작업 내용
Nested CSS warning 해결
Error log
해결 방법
withastro/astro#6202
Design System 세팅 완료
Color
Font
✅ PR 포인트
Issue close #11
📸 스크린샷