-
Notifications
You must be signed in to change notification settings - Fork 0
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
Panda CSS 의존성 제거 및 기존 코드 수정 #50
Changes from all commits
7189286
dff3e87
ad60e87
10dcfa7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.certificate { | ||
footer { | ||
@media print { | ||
display: none; | ||
} | ||
} | ||
} | ||
Comment on lines
+1
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CSS Nesting과 같은 Modern CSS 문법을 잘 활용하면 CSS Modules를 쓰더라도 괜찮은 개발자 경험을 할 수 있습니다. 무엇보다 옛날처럼 복잡하게 다수의 스타일을 임포트해서 여러 HTML 요소에 달아주지 않아서 되고요, 타입 선택자를 사용할 수 있기 때문에 일일이 클래스 네이밍을 해줘야하는 스트레스도 줄일 수 있습니다. 혹시 CSS Nesting이 생소하시다면 이 블로그 포스팅을 읽어보시기 바랍니다: https://www.daleseo.com/css-nesting/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.leaderboard { | ||
article { | ||
ul { | ||
li { | ||
margin-bottom: 20px; | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import styles from "./Leaderboard.module.css"; | ||
|
||
export default function Leaderboard() { | ||
const members = [ | ||
{ name: "DaleSeo", solved: 71, rank: "새싹" }, | ||
|
@@ -9,14 +11,14 @@ export default function Leaderboard() { | |
]; | ||
|
||
return ( | ||
<div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<main className={styles.leaderboard}> | ||
<h1>Leaderboard</h1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 최상위 요소를 main으로 바꾼다면 #17 (comment) 에서 말씀하시 것처럼 전체 페이지가 main에 들어갈 수 있으니 빼는게 좋을까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! 제가 후딱 코드를 고치느라 일관성만 생각하고 더 큰 그림을 보지 못했습니다. 이 부분 나중에 |
||
|
||
<section aria-labelledby="leaderboard"> | ||
<article aria-labelledby="leaderboard"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 흠 이 부분에 대해서 section으로 할 지 article로 할 지 고민했는데 피드백 감사합니다! |
||
<h2 id="leaderboard">Members List</h2> | ||
<ul> | ||
{members.map((member) => ( | ||
<li key={member.name} style={{ marginBottom: "20px" }}> | ||
<li key={member.name}> | ||
<div>등급: {member.rank}</div> | ||
<div>진행 상황: {member.solved}</div> | ||
<div> | ||
|
@@ -30,7 +32,7 @@ export default function Leaderboard() { | |
</li> | ||
))} | ||
</ul> | ||
</section> | ||
</div> | ||
</article> | ||
</main> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,82 @@ | ||
@layer reset, base, tokens, recipes, utilities; | ||
:root { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/DaleStudy/leetcode-website/blob/main/global-styles.css 의 내용을 그대로 복사해왔습니다. 기존 웹사이트와 일관적인 스타일을 하시는데 도움이 될 거라 생각합니다. |
||
--primary: #846de9; | ||
--secondary: #24eaca; | ||
--bg-100: #fdfdff; | ||
--bg-200: #fbfaff; | ||
--bg-300: #eee8fe; | ||
--bg-400: #5333e1; | ||
--text-900: #160b46; | ||
--font-weight-light: 300; | ||
--font-weight-regular: 400; | ||
--font-weight-medium: 500; | ||
--font-weight-bold: 700; | ||
} | ||
|
||
* { | ||
font-family: "Spoqa Han Sans Neo", "Noto Sans KR", sans-serif; | ||
} | ||
|
||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
|
||
html { | ||
scroll-behavior: smooth; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
color: inherit; | ||
background: none; | ||
border: none; | ||
font: inherit; | ||
margin: 0; | ||
padding: 0; | ||
cursor: pointer; | ||
} | ||
|
||
a:visited { | ||
color: inherit; | ||
} | ||
|
||
a:hover { | ||
color: inherit; | ||
text-decoration: none; | ||
transition: 200ms; | ||
} | ||
|
||
a:active { | ||
color: inherit; | ||
} | ||
|
||
a:focus { | ||
outline: none; | ||
} | ||
|
||
button:hover { | ||
transition: 200ms; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
ol, | ||
ul, | ||
li { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
ol, | ||
ul { | ||
list-style-type: none; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,6 @@ | |
"include": [ | ||
"src", | ||
/* Vitest */ | ||
"vitest.setup.ts", | ||
/* PandaCSS */ | ||
"styled-system" | ||
"vitest.setup.ts" | ||
] | ||
} |
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.
#35 (comment) 를 참고하여 Tanstack Query도 아직 쓰는 곳이 없길래 우선 제거하였습니다.
필요한 분이 나중에 언제든지 추가할 수 있습니다.